summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing
diff options
context:
space:
mode:
authorlzheng@chromium.org <lzheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 17:47:31 +0000
committerlzheng@chromium.org <lzheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 17:47:31 +0000
commiteaa4226c0d2c9d8d108fbbb698408c087a43874a (patch)
tree04324768a07e4ce5aaf1fc34a2b756f90a055002 /chrome/browser/safe_browsing
parent61265352c022321d94fc99f59a7dcdd837ee05c6 (diff)
downloadchromium_src-eaa4226c0d2c9d8d108fbbb698408c087a43874a.zip
chromium_src-eaa4226c0d2c9d8d108fbbb698408c087a43874a.tar.gz
chromium_src-eaa4226c0d2c9d8d108fbbb698408c087a43874a.tar.bz2
Enable download protection by default and convert the enable switch to disable switch.
Since currently on download url is checked, this only enables download url checks. Because the safe browsing server used by safe_browsing_test.cc does not understand the new list for safebrowsing download, we have to disable the download protect in that test. TEST=safe browsing related tests stay green. BUG=60822 Review URL: http://codereview.chromium.org/6611006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77297 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_test.cc5
3 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 04ec974..5bbfb6f 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -525,7 +525,7 @@ void SafeBrowsingService::OnIOInitialize(
CommandLine* cmdline = CommandLine::ForCurrentProcess();
enable_download_protection_ =
- cmdline->HasSwitch(switches::kSbEnableDownloadProtection);
+ !cmdline->HasSwitch(switches::kSbDisableDownloadProtection);
MakeDatabaseAvailable();
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
index 44c4be8..eeb302d 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -289,8 +289,6 @@ class SafeBrowsingServiceTest : public InProcessBrowserTest {
// This test will fill up the database using testing prefixes
// and urls.
command_line->AppendSwitch(switches::kSbDisableAutoUpdate);
-
- command_line->AppendSwitch(switches::kSbEnableDownloadProtection);
}
virtual void SetUpInProcessBrowserTestFixture() {
diff --git a/chrome/browser/safe_browsing/safe_browsing_test.cc b/chrome/browser/safe_browsing/safe_browsing_test.cc
index e17cbd5..aad0d1a 100644
--- a/chrome/browser/safe_browsing/safe_browsing_test.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_test.cc
@@ -289,11 +289,16 @@ class SafeBrowsingServiceTest : public InProcessBrowserTest {
// Makes sure the auto update is not triggered. This test will force the
// update when needed.
command_line->AppendSwitch(switches::kSbDisableAutoUpdate);
+
// This test uses loopback. No need to use IPv6 especially it makes
// local requests slow on Windows trybot when ipv6 local address [::1]
// is not setup.
command_line->AppendSwitch(switches::kDisableIPv6);
+ // TODO(lzheng): The test server does not understand download related
+ // requests. We need to fix the server.
+ command_line->AppendSwitch(switches::kSbDisableDownloadProtection);
+
// In this test, we fetch SafeBrowsing data and Mac key from the same
// server. Although in real production, they are served from different
// servers.