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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 6708059: Turn on client-side phishing detection for UMA users with SafeBrowsing enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 9 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
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698