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