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

Unified Diff: components/safe_browsing_db/safe_browsing_prefs.h

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
« no previous file with comments | « components/safe_browsing_db/DEPS ('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
new file mode 100644
index 0000000000000000000000000000000000000000..1232401d75718a67a541561733287bbc0c1fab9f
--- /dev/null
+++ b/components/safe_browsing_db/safe_browsing_prefs.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Safe Browsing preferences and some basic utility functions for using them.
+
+#ifndef COMPONENTS_SAFE_BROWSING_DB_SAFE_BROWSING_PREFS_H_
+#define COMPONENTS_SAFE_BROWSING_DB_SAFE_BROWSING_PREFS_H_
+
+class PrefService;
+
+namespace prefs {
+extern const char kSafeBrowsingExtendedReportingEnabled[];
+}
+
+namespace safe_browsing {
+
+// 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();
+
+// Returns whether Safe Browsing Extended Reporting is currently enabled.
+// This should be used to decide if any of the reporting preferences are set,
+// regardless of which specific one is set.
+bool IsExtendedReportingEnabled(const PrefService& prefs);
+
+// Updates UMA metrics about Safe Browsing Extended Reporting states.
+void RecordExtendedReportingMetrics(const PrefService& prefs);
+
+} // namespace safe_browsing
+
+#endif // COMPONENTS_SAFE_BROWSING_DB_SAFE_BROWSING_PREFS_H_
« no previous file with comments | « components/safe_browsing_db/DEPS ('k') | components/safe_browsing_db/safe_browsing_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698