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

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

Issue 14999008: Add a killswitch for CSD malware IP match and report feature. Use a new killswitch whitelist URL wh… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/client_side_detection_service.h
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.h b/chrome/browser/safe_browsing/client_side_detection_service.h
index f6fe23e287b814b984310ed7650bf17a7007f2aa..928e05d621dbbc6dac510734748c7ce162567485 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.h
+++ b/chrome/browser/safe_browsing/client_side_detection_service.h
@@ -85,6 +85,14 @@ class ClientSideDetectionService : public net::URLFetcherDelegate,
return enabled_;
}
+ void SetMalwareEnabled(bool malware_killswitch) {
+ malware_enabled_ = !malware_killswitch;
+ }
+
+ bool MalwareEnabled() const {
+ return malware_enabled_;
+ }
+
// From the net::URLFetcherDelegate interface.
virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
@@ -279,6 +287,9 @@ class ClientSideDetectionService : public net::URLFetcherDelegate,
// it won't download the model nor report detected phishing URLs.
bool enabled_;
+ // Whether the malware IP matching feature is enabled.
+ bool malware_enabled_;
+
std::string model_str_;
scoped_ptr<ClientSideModel> model_;
scoped_ptr<base::TimeDelta> model_max_age_;

Powered by Google App Engine
This is Rietveld 408576698