Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2168)

Unified Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc

Issue 2418813002: [Reland] Refactoring of SBER preference usage (Closed)
Patch Set: Sync Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
index 9c78afa989a423e944b1521219c292e8cd3d1d2f..0a6e6f68d37ca1800510c40811be80dab00bc887 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -34,6 +34,7 @@
#include "chrome/grit/generated_resources.h"
#include "components/google/core/browser/google_util.h"
#include "components/prefs/pref_service.h"
+#include "components/safe_browsing_db/safe_browsing_prefs.h"
#include "components/security_interstitials/core/common_string_util.h"
#include "components/security_interstitials/core/controller_client.h"
#include "content/public/browser/browser_thread.h"
@@ -406,7 +407,7 @@ void SafeBrowsingBlockingPage::FinishThreatDetails(int64_t delay_ms,
return; // Not all interstitials have threat details (eg., incognito mode).
const bool enabled =
- IsPrefEnabled(prefs::kSafeBrowsingExtendedReportingEnabled) &&
+ IsExtendedReportingEnabled(*profile()->GetPrefs()) &&
IsPrefEnabled(prefs::kSafeBrowsingExtendedReportingOptInAllowed);
if (!enabled)
return;
@@ -690,7 +691,7 @@ void SafeBrowsingBlockingPage::PopulateExtendedReportingOption(
base::UTF8ToUTF16(privacy_link)));
load_time_data->SetBoolean(
security_interstitials::kBoxChecked,
- IsPrefEnabled(prefs::kSafeBrowsingExtendedReportingEnabled));
+ IsExtendedReportingEnabled(*profile()->GetPrefs()));
}
void SafeBrowsingBlockingPage::PopulateMalwareLoadTimeData(

Powered by Google App Engine
This is Rietveld 408576698