diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-17 16:02:19 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-17 16:02:19 +0000 |
commit | 13147160ae28933269024ba973f0a1ae3d11a57d (patch) | |
tree | 3817578c54a3304d82b0df7efe8b7cd958e20206 /chrome/browser/safe_browsing/safe_browsing_database.cc | |
parent | 897fa12b0446cdf6beb1d3166d098fe13daadbf6 (diff) | |
download | chromium_src-13147160ae28933269024ba973f0a1ae3d11a57d.zip chromium_src-13147160ae28933269024ba973f0a1ae3d11a57d.tar.gz chromium_src-13147160ae28933269024ba973f0a1ae3d11a57d.tar.bz2 |
Delete SafeBrowsingDatabaseBloom implementation.
This is the old safe-browsing database based on direct SQLite access.
It has been replaced by SafeBrowsingDatabaseNew.
BUG=58551
TEST=none
Review URL: http://codereview.chromium.org/3845003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62896 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_database.cc')
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_database.cc | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.cc b/chrome/browser/safe_browsing/safe_browsing_database.cc index 3301666..823362f 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database.cc @@ -4,7 +4,6 @@ #include "chrome/browser/safe_browsing/safe_browsing_database.h" -#include "base/command_line.h" #include "base/file_util.h" #include "base/metrics/histogram.h" #include "base/metrics/stats_counters.h" @@ -13,10 +12,8 @@ #include "base/process_util.h" #include "base/sha2.h" #include "chrome/browser/safe_browsing/bloom_filter.h" -#include "chrome/browser/safe_browsing/safe_browsing_database_bloom.h" #include "chrome/browser/safe_browsing/safe_browsing_store_file.h" #include "chrome/browser/safe_browsing/safe_browsing_store_sqlite.h" -#include "chrome/common/chrome_switches.h" #include "googleurl/src/gurl.h" namespace { @@ -146,38 +143,13 @@ bool SBAddFullHashPrefixLess(const SBAddFullHash& a, const SBAddFullHash& b) { } // namespace // Factory method. -// TODO(shess): Proposed staging of the rolling: -// - Ship "old" to dev channel to provide a safe fallback. -// - If that proves stable, change to "newsqlite". This changes the -// code which manipulates the data, without changing the data -// format. At this point all changes could be reverted without -// having to resync everyone's database from scratch. -// - If SafeBrowsingDatabaseNew proves stable, change the default to -// "newfile", which will change the file format. Changing back -// would require resync from scratch. -// - Once enough users are converted to "newfile", remove all of the -// redundent indirection classes and functions, perhaps leaving -// SafeBrowsingStoreSqlite for on-the-fly conversions. -// - Once there are few remaining SQLite-format users, remove -// SafeBrowsingStoreSqlite. Remaining users will resync their -// safe-browsing database from scratch. If users haven't sync'ed -// their database in months, this probably won't be more expensive -// than an incremental sync. +// TODO(shess): Milestone-7 is converting from SQLite-based +// SafeBrowsingDatabaseBloom to the new file format with +// SafeBrowsingDatabaseNew. Once that conversion is too far along to +// consider reversing, circle back and lift SafeBrowsingDatabaseNew up +// to SafeBrowsingDatabase and get rid of the abstract class. SafeBrowsingDatabase* SafeBrowsingDatabase::Create() { - const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - std::string value = - command_line.GetSwitchValueASCII(switches::kSafeBrowsingDatabaseStore); - if (!value.compare("newfile")) { - return new SafeBrowsingDatabaseNew(new SafeBrowsingStoreFile); - } else if (!value.compare("newsqlite")) { - return new SafeBrowsingDatabaseNew(new SafeBrowsingStoreSqlite); - } else if (!value.compare("old")) { - return new SafeBrowsingDatabaseBloom; - } else { - // Default. - DCHECK(value.empty()); - return new SafeBrowsingDatabaseNew(new SafeBrowsingStoreFile); - } + return new SafeBrowsingDatabaseNew(new SafeBrowsingStoreFile); } SafeBrowsingDatabase::~SafeBrowsingDatabase() { |