Chromium Code Reviews| Index: chrome/browser/safe_browsing/safe_browsing_service.cc |
| diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc |
| index e31ffbab27da37c1bd1f4ad1ef9d702d6ea5449d..9e6693dfbb525e26b72fe64f82cb071600544363 100644 |
| --- a/chrome/browser/safe_browsing/safe_browsing_service.cc |
| +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc |
| @@ -15,6 +15,7 @@ |
| #include "chrome/browser/metrics/metrics_service.h" |
| #include "chrome/browser/prefs/pref_service.h" |
| #include "chrome/browser/profiles/profile_manager.h" |
| +#include "chrome/browser/safe_browsing/client_side_detection_service.h" |
|
noelutz
2011/03/28 20:55:16
Is this header necessary?
Brian Ryner
2011/03/29 00:04:41
Whoops, this was left over from a code reorganizat
|
| #include "chrome/browser/safe_browsing/malware_details.h" |
| #include "chrome/browser/safe_browsing/protocol_manager.h" |
| #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
| @@ -243,10 +244,11 @@ bool SafeBrowsingService::CheckDownloadHash(const std::string& full_hash, |
| bool SafeBrowsingService::MatchCsdWhitelistUrl(const GURL& url) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| - DCHECK(enable_csd_whitelist_); |
| if (!enabled_ || !enable_csd_whitelist_ || !MakeDatabaseAvailable()) { |
| - // There is something funky going on here. Just to be safe we return |
| - // true in this case. |
| + // There is something funky going on here -- for example, perhaps the user |
| + // has not restarted since enabling metrics reporting, so we haven't |
| + // enabled the csd whitelist yet. Just to be safe we return true in this |
| + // case. |
| return true; |
| } |
| return database_->ContainsCsdWhitelistedUrl(url); |
| @@ -882,7 +884,7 @@ void SafeBrowsingService::Start() { |
| // cannot check whether the metrics_service() object is created because it |
| // may be initialized after this method is called. |
| enable_csd_whitelist_ = |
| - (cmdline->HasSwitch(switches::kEnableClientSidePhishingDetection) && |
| + (!cmdline->HasSwitch(switches::kDisableClientSidePhishingDetection) && |
| local_state && local_state->GetBoolean(prefs::kMetricsReportingEnabled)); |
| BrowserThread::PostTask( |