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

Unified Diff: components/safe_browsing_db/safe_browsing_prefs.h

Issue 2505153002: Add support for scout to 'ext' param when creating SafeBrowsing ping URLs. (Closed)
Patch Set: Go back to IsExtendedReportingEnabled where level doesn't matter Created 4 years, 1 month 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
« no previous file with comments | « components/safe_browsing_db/hit_report.h ('k') | components/safe_browsing_db/safe_browsing_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing_db/safe_browsing_prefs.h
diff --git a/components/safe_browsing_db/safe_browsing_prefs.h b/components/safe_browsing_db/safe_browsing_prefs.h
index f7f907e9bc8be5c562c5bd5e7dca0212c602e6fa..c46da743dc37a94136cef3a442f0abe255a701e8 100644
--- a/components/safe_browsing_db/safe_browsing_prefs.h
+++ b/components/safe_browsing_db/safe_browsing_prefs.h
@@ -42,6 +42,19 @@ extern const base::Feature kCanShowScoutOptIn;
// TODO: this is temporary (crbug.com/662944)
extern const base::Feature kOnlyShowScoutOptIn;
+// Enumerates the level of Safe Browsing Extended Reporting that is currently
+// available.
+enum ExtendedReportingLevel {
+ // Extended reporting is off.
+ SBER_LEVEL_OFF = 0,
+ // The Legacy level of extended reporting is available, reporting happens in
+ // response to security incidents.
+ SBER_LEVEL_LEGACY = 1,
+ // The Scout level of extended reporting is available, some data can be
+ // collected to actively detect dangerous apps and sites.
+ SBER_LEVEL_SCOUT = 2,
+};
+
// Determines which opt-in text should be used based on the currently active
// preference. Will return either |extended_reporting_resource| if the legacy
// Extended Reporting pref is active, or |scout_resource| if the Scout pref is
@@ -54,6 +67,9 @@ int ChooseOptInTextResource(const PrefService& prefs,
// preference exists (eg: has been set before).
bool ExtendedReportingPrefExists(const PrefService& prefs);
+// Returns the level of reporting available for the current user.
+ExtendedReportingLevel GetExtendedReportingLevel(const PrefService& prefs);
+
// Returns the name of the Safe Browsing Extended Reporting pref that is
// currently in effect. The specific pref in-use may change through experiments.
const char* GetExtendedReportingPrefName(const PrefService& prefs);
« no previous file with comments | « components/safe_browsing_db/hit_report.h ('k') | components/safe_browsing_db/safe_browsing_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698