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

Unified Diff: components/safe_browsing_db/database_manager.cc

Issue 2648193002: SafeBrowsing: Move enabled_ to base class DB Manager (Closed)
Patch Set: Update comments 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: components/safe_browsing_db/database_manager.cc
diff --git a/components/safe_browsing_db/database_manager.cc b/components/safe_browsing_db/database_manager.cc
index 91e4d7b6bbdbb1c6d2c893e95d81312c7453d357..0155efc9f8f2b28147f7bcb39b7bbe284a370637 100644
--- a/components/safe_browsing_db/database_manager.cc
+++ b/components/safe_browsing_db/database_manager.cc
@@ -15,7 +15,7 @@ using content::BrowserThread;
namespace safe_browsing {
-SafeBrowsingDatabaseManager::SafeBrowsingDatabaseManager() {}
+SafeBrowsingDatabaseManager::SafeBrowsingDatabaseManager() : enabled_(false) {}
SafeBrowsingDatabaseManager::~SafeBrowsingDatabaseManager() {
DCHECK(!v4_get_hash_protocol_manager_);
@@ -37,8 +37,9 @@ bool SafeBrowsingDatabaseManager::CheckApiBlacklistUrl(const GURL& url,
DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(v4_get_hash_protocol_manager_);
- // Make sure we can check this url.
- if (!(url.SchemeIs(url::kHttpScheme) || url.SchemeIs(url::kHttpsScheme))) {
+ // Make sure we can check this url and that the service is enabled.
+ if (!enabled_ ||
+ !(url.SchemeIs(url::kHttpScheme) || url.SchemeIs(url::kHttpsScheme))) {
return true;
}
« no previous file with comments | « components/safe_browsing_db/database_manager.h ('k') | components/safe_browsing_db/remote_database_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698