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_ |