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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service.h

Issue 2647323009: Add extended reporting level in the update request (Closed)
Patch Set: Created 3 years, 11 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_service.h
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h
index 07b97413901be99de79430e8ed362daed3eef9a8..e9746b03cef4cccc2ddf1c89bda482af0ef254c4 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -112,6 +112,24 @@ class SafeBrowsingService : public base::RefCountedThreadSafe<
return enabled_by_prefs_;
}
+ // NOTE(vakh): This is not the most reliable way to find out if extended
+ // reporting has been enabled. That's why it starts with maybe_. It returns
+ // true if any of the profiles have extended reporting enabled. Both
+ // |maybe_enabled_extended_reporting_by_prefs| and
+ // |maybe_enabled_scout_reporting_by_prefs| can be true at the same time. The
+ // caller is free to interpret that state as it sees fit. It may be called on
+ // any thread. That can lead to a race condition, but that's acceptable.
+ bool maybe_enabled_extended_reporting_by_prefs() const {
+ return maybe_enabled_extended_reporting_by_prefs_;
+ }
+
+ // NOTE(vakh): This is not the most reliable way to find out if Scout
+ // reporting has been enabled. For more details, see the comment above
+ // maybe_enabled_extended_reporting_by_prefs().
+ bool maybe_enabled_scout_reporting_by_prefs() const {
+ return maybe_enabled_scout_reporting_by_prefs_;
+ }
+
ClientSideDetectionService* safe_browsing_detection_service() const {
return services_delegate_->GetCsdService();
}
@@ -282,6 +300,14 @@ class SafeBrowsingService : public base::RefCountedThreadSafe<
// Accessed on UI thread.
bool enabled_by_prefs_;
+ // Whether SafeBrowsing Extended Reporting is enabled by the current set of
+ // profiles. Updated on the UI thread.
+ bool maybe_enabled_extended_reporting_by_prefs_;
+
+ // Whether SafeBrowsing Scout Reporting is enabled by the current set of
+ // profiles. Updated on the UI thread.
+ bool maybe_enabled_scout_reporting_by_prefs_;
+
// Whether SafeBrowsing needs to be enabled in V4Only mode. In this mode, all
// SafeBrowsing decisions are made using the PVer4 implementation.
bool enabled_v4_only_;

Powered by Google App Engine
This is Rietveld 408576698