diff options
author | noelutz@google.com <noelutz@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-02 01:03:47 +0000 |
---|---|---|
committer | noelutz@google.com <noelutz@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-02 01:03:47 +0000 |
commit | b200c7d76ff617a3f047311ba203a85034f534fb (patch) | |
tree | 46e005df252927482db4b4d1fad4343a6032e32a /chrome | |
parent | d1768aba544880e2c6575e7148491fa3a2b94a9a (diff) | |
download | chromium_src-b200c7d76ff617a3f047311ba203a85034f534fb.zip chromium_src-b200c7d76ff617a3f047311ba203a85034f534fb.tar.gz chromium_src-b200c7d76ff617a3f047311ba203a85034f534fb.tar.bz2 |
Turn client-side phishing detection on for non-UMA users.
On the server side we have a 1% experiment.
BUG=94757
TEST=None
Review URL: http://codereview.chromium.org/7809011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99281 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_service.cc | 8 | ||||
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_test.cc | 5 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 12 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 2 |
4 files changed, 16 insertions, 11 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index 256b0e1..d640f1c 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc @@ -169,8 +169,8 @@ SafeBrowsingService::SafeBrowsingService() #if !defined(OS_CHROMEOS) if (!CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableClientSidePhishingDetection) && - (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableSanitizedClientSidePhishingDetection) || + (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableSanitizedClientSidePhishingDetection) || CanReportStats())) { csd_service_.reset( safe_browsing::ClientSideDetectionService::Create( @@ -901,8 +901,8 @@ void SafeBrowsingService::Start() { #else enable_csd_whitelist_ = (!cmdline->HasSwitch(switches::kDisableClientSidePhishingDetection) && - (cmdline->HasSwitch( - switches::kEnableSanitizedClientSidePhishingDetection) || + (!cmdline->HasSwitch( + switches::kDisableSanitizedClientSidePhishingDetection) || (local_state && local_state->GetBoolean(prefs::kMetricsReportingEnabled)))); #endif diff --git a/chrome/browser/safe_browsing/safe_browsing_test.cc b/chrome/browser/safe_browsing/safe_browsing_test.cc index c521445..780a3fa 100644 --- a/chrome/browser/safe_browsing/safe_browsing_test.cc +++ b/chrome/browser/safe_browsing/safe_browsing_test.cc @@ -303,6 +303,11 @@ class SafeBrowsingServiceTest : public InProcessBrowserTest { // requests. We need to fix the server. command_line->AppendSwitch(switches::kSbDisableDownloadProtection); + // TODO(gcasto): Generate new testing data that includes the + // client-side phishing whitelist. + command_line->AppendSwitch( + switches::kDisableSanitizedClientSidePhishingDetection); + // In this test, we fetch SafeBrowsing data and Mac key from the same // server. Although in real production, they are served from different // servers. diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index a1d8084..5f120ac 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -294,6 +294,12 @@ const char kDisableRemoteFonts[] = "disable-remote-fonts"; const char kDisableRestoreBackgroundContents[] = "disable-restore-background-contents"; +// Disable the sanitized version of client-side phishing detection, for use by +// non-UMA users. Any features containing portions of the URL or page content +// are not sent as part of the pingback in this mode. +const char kDisableSanitizedClientSidePhishingDetection[] = + "disable-sanitized-client-side-phishing-detection"; + // Disable site-specific tailoring to compatibility issues in WebKit. const char kDisableSiteSpecificQuirks[] = "disable-site-specific-quirks"; @@ -509,12 +515,6 @@ const char kEnablePanels[] = "enable-panels"; // Enable speculative TCP/IP preconnection. const char kEnablePreconnect[] = "enable-preconnect"; -// Enables the sanitized version of client-side phishing detection, for use by -// non-UMA users. Any features containing portions of the URL or page content -// are not sent as part of the pingback in this mode. -const char kEnableSanitizedClientSidePhishingDetection[] = - "enable-sanitized-client-side-phishing-detection"; - // Enable the IsSearchProviderInstalled and InstallSearchProvider with an extra // parameter to indicate if the provider should be the default. const char kEnableSearchProviderApiV2[] = "enable-search-provider-api-v2"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 3891c386..62a3d37 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -89,6 +89,7 @@ extern const char kDisablePreconnect[]; extern const char kDisablePromptOnRepost[]; extern const char kDisableRemoteFonts[]; extern const char kDisableRestoreBackgroundContents[]; +extern const char kDisableSanitizedClientSidePhishingDetection[]; extern const char kDisableSiteSpecificQuirks[]; extern const char kDisableSSL3[]; extern const char kDisableSSLFalseStart[]; @@ -147,7 +148,6 @@ extern const char kEnableOriginBoundCerts[]; extern const char kEnablePanels[]; extern const char kEnablePreconnect[]; extern const char kEnableResourceContentSettings[]; -extern const char kEnableSanitizedClientSidePhishingDetection[]; extern const char kEnableSearchProviderApiV2[]; extern const char kEnableShortcutsProvider[]; extern const char kEnableSmoothScrolling[]; |