summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authornoelutz@google.com <noelutz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-09 02:50:58 +0000
committernoelutz@google.com <noelutz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-09 02:50:58 +0000
commit838dd914a5bd6a049915984c9619d69ef160b82e (patch)
treedc5014262f29ebb060dd7fc6bf4c40b2e99127cf /chrome
parent66115778d609efee59b8224dea88e39d067fd267 (diff)
downloadchromium_src-838dd914a5bd6a049915984c9619d69ef160b82e.zip
chromium_src-838dd914a5bd6a049915984c9619d69ef160b82e.tar.gz
chromium_src-838dd914a5bd6a049915984c9619d69ef160b82e.tar.bz2
Enable client-side phishing detection only for canary, dev and beta builds.
BUG=81625 TEST=NONE Review URL: http://codereview.chromium.org/6932023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84602 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser_process_impl.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 8d37ca4..274ebca 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -39,6 +39,7 @@
#include "chrome/browser/net/predictor_api.h"
#include "chrome/browser/net/sdch_dictionary_fetcher.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
+#include "chrome/browser/platform_util.h"
#include "chrome/browser/plugin_data_remover.h"
#include "chrome/browser/policy/browser_policy_connector.h"
#include "chrome/browser/prefs/browser_prefs.h"
@@ -951,13 +952,17 @@ void BrowserProcessImpl::CreateSafeBrowsingDetectionService() {
bool BrowserProcessImpl::IsSafeBrowsingDetectionServiceEnabled() {
// The safe browsing client-side detection is enabled only if the switch is
// enabled and when safe browsing related stats is allowed to be collected.
+ // For now we only enable client-side detection on the canary, dev and beta
+ // channel.
#ifdef OS_CHROMEOS
return false;
#else
+ std::string channel = platform_util::GetVersionStringModifier();
return !CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableClientSidePhishingDetection) &&
resource_dispatcher_host()->safe_browsing_service() &&
- resource_dispatcher_host()->safe_browsing_service()->CanReportStats();
+ resource_dispatcher_host()->safe_browsing_service()->CanReportStats() &&
+ (channel == "beta" || channel == "dev" || channel == "canary");
#endif
}