diff options
-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[]; |