Commit c1e7fa31 authored by Andy Paicu's avatar Andy Paicu Committed by Commit Bot

Revert "Reversed crowd deny preload list logic"

This reverts commit c94520a9.

Reason for revert: Found bug in CL

Original change's description:
> Reversed crowd deny preload list logic
> 
> The crowd deny preload list now contains sites with a site reputation
> of UNSOLICITED_PROMPTS. If a site is not on the preload list the normal
> UI is used, otherwise a safe browsing ping is made to ensure that the
> preload list is accurate.
> 
> Unit tests and test-fixes in a follow-up CL: For the purposes of speed
> I have removed the failing test, will be re-added in the follow-up CL
> along with new tests to account for this logic change.
> 
> Bug: 1042611
> Change-Id: I35e14d9b7cd8de5191291cd113a0e50a78e91f47
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2003849
> Commit-Queue: Andy Paicu <andypaicu@chromium.org>
> Reviewed-by: Balazs Engedy <engedy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#732363}

TBR=engedy@chromium.org,andypaicu@chromium.org,hkamila@chromium.org

Change-Id: I5a6c4db81cc05e4137be44f6e234b4ee6a194f72
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1042611
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2002519Reviewed-by: default avatarAndy Paicu <andypaicu@chromium.org>
Commit-Queue: Andy Paicu <andypaicu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732368}
parent 675c2d74
......@@ -136,12 +136,11 @@ void ContextualNotificationPermissionUiSelector::EvaluateCrowdDenyTrigger(
base::Optional<UiToUse> ui_to_use = GetUiToUseBasedOnSiteReputation(
CrowdDenyPreloadData::GetInstance()->GetReputationDataForSite(origin));
if (!ui_to_use || *ui_to_use == UiToUse::kQuietUi) {
OnCrowdDenyTriggerEvaluated(UiToUse::kNormalUi);
if (ui_to_use) {
OnCrowdDenyTriggerEvaluated(*ui_to_use);
return;
}
// PreloadData suggests a spammy site, ping safe browsing to verify.
DCHECK(!safe_browsing_request_);
DCHECK(g_browser_process->safe_browsing_service());
......
......@@ -969,8 +969,7 @@ TEST_F(PermissionRequestManagerTest, TestWebKioskModeDifferentOrigin) {
}
#endif // defined(OS_CHROMEOS)
// TODO(andypaicu): re-enable ASAP. crbug.com/1042611
TEST_F(PermissionRequestManagerTest, DISABLED_TestCrowdDenyHoldbackChance) {
TEST_F(PermissionRequestManagerTest, TestCrowdDenyHoldbackChance) {
const struct {
std::string holdback_chance;
bool enabled_in_prefs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment