| 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..698e4324fd88d65ace76c2387c0c976c7583d6c3 100644
|
| --- a/chrome/browser/safe_browsing/safe_browsing_service.cc
|
| +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
|
| @@ -243,10 +243,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);
|
| @@ -881,9 +882,15 @@ void SafeBrowsingService::Start() {
|
| // enabled and if the user has opted in with stats collection. Note: we
|
| // cannot check whether the metrics_service() object is created because it
|
| // may be initialized after this method is called.
|
| +#ifdef OS_CHROMEOS
|
| + // Client-side detection is disabled on ChromeOS for now, so don't bother
|
| + // downloading the whitelist.
|
| + enable_csd_whitelist_ = false;
|
| +#else
|
| enable_csd_whitelist_ =
|
| - (cmdline->HasSwitch(switches::kEnableClientSidePhishingDetection) &&
|
| + (!cmdline->HasSwitch(switches::kDisableClientSidePhishingDetection) &&
|
| local_state && local_state->GetBoolean(prefs::kMetricsReportingEnabled));
|
| +#endif
|
|
|
| BrowserThread::PostTask(
|
| BrowserThread::IO, FROM_HERE,
|
|
|