diff options
author | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-26 00:18:27 +0000 |
---|---|---|
committer | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-26 00:18:27 +0000 |
commit | 7ab49572bb55d092e757dc04a0c8ecafaf893e16 (patch) | |
tree | 95c318fd8dcb0c7befbbc849bd91c4ef2a1bd87e | |
parent | 6705b23f96dc6953abe9911907a8d25d924e5e7f (diff) | |
download | chromium_src-7ab49572bb55d092e757dc04a0c8ecafaf893e16.zip chromium_src-7ab49572bb55d092e757dc04a0c8ecafaf893e16.tar.gz chromium_src-7ab49572bb55d092e757dc04a0c8ecafaf893e16.tar.bz2 |
Turn on the new SafeBrowsing by default. To use the older
implemenation, use the command line flag: --old-safe-browsing
Review URL: http://codereview.chromium.org/12448
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6015 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_database.cc | 6 | ||||
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_database_unittest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_service.cc | 2 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 7 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 2 |
5 files changed, 10 insertions, 11 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.cc b/chrome/browser/safe_browsing/safe_browsing_database.cc index 92961c3..fc3254d 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database.cc @@ -20,9 +20,9 @@ static const wchar_t kBloomFilterFile[] = L" Filter"; // Factory method. SafeBrowsingDatabase* SafeBrowsingDatabase::Create() { - if (CommandLine().HasSwitch(switches::kUseNewSafeBrowsing)) - return new SafeBrowsingDatabaseBloom; - return new SafeBrowsingDatabaseImpl; + if (CommandLine().HasSwitch(switches::kUseOldSafeBrowsing)) + return new SafeBrowsingDatabaseImpl; + return new SafeBrowsingDatabaseBloom; } bool SafeBrowsingDatabase::NeedToCheckUrl(const GURL& url) { diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc index d63b131..a63765e 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc @@ -368,7 +368,7 @@ TEST(SafeBrowsingDatabase, Database) { chunks = new std::deque<SBChunk>; chunks->push_back(chunk); database->UpdateStarted(); - GetListsInfo(database, &lists); + database->GetListsInfo(&lists); database->InsertChunks(safe_browsing_util::kMalwareList, chunks); database->UpdateFinished(true); lists.clear(); @@ -906,7 +906,7 @@ TEST(SafeBrowsingDatabase, HashCaching) { // Test receiving a full add chunk. The old implementation doesn't support // this test, so we bail here. - if (!CommandLine().HasSwitch(switches::kUseNewSafeBrowsing)) { + if (CommandLine().HasSwitch(switches::kUseOldSafeBrowsing)) { TearDownTestDatabase(database); return; } diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index ad0b1f5..3a6fff3 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc @@ -33,7 +33,7 @@ SafeBrowsingService::SafeBrowsingService() enabled_(false), resetting_(false), database_loaded_(false) { - new_safe_browsing_ = CommandLine().HasSwitch(switches::kUseNewSafeBrowsing); + new_safe_browsing_ = !CommandLine().HasSwitch(switches::kUseOldSafeBrowsing); } SafeBrowsingService::~SafeBrowsingService() { diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index cafb6f1..4681f00 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -336,10 +336,9 @@ const wchar_t kEnableGreasemonkey[] = L"enable-greasemonkey"; // Causes the browser to launch directly in incognito mode. const wchar_t kIncognito[] = L"incognito"; -// Turn on an experimental implementation of SafeBrowsing which improves -// performance during updates by avoiding the enormous IO from SQLite -// operations. -const wchar_t kUseNewSafeBrowsing[] = L"new-safe-browsing"; +// Turn on the old implementation of SafeBrowsing which may have performance +// problems on some computers during updates. +const wchar_t kUseOldSafeBrowsing[] = L"old-safe-browsing"; // Turns on the accessibility in the renderer. Off by default until // http://b/issue?id=1432077 is fixed. diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 9e99a80..a2ef36e 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -131,7 +131,7 @@ extern const wchar_t kSdchFilter[]; extern const wchar_t kEnableGreasemonkey[]; extern const wchar_t kIncognito[]; -extern const wchar_t kUseNewSafeBrowsing[]; +extern const wchar_t kUseOldSafeBrowsing[]; extern const wchar_t kEnableRendererAccessibility[]; |