diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-18 20:34:04 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-18 20:34:04 +0000 |
commit | c2316134f2d4c02d641e1f0f4ac1e61749313ab4 (patch) | |
tree | e794f2bc2c97088764d384ab6efe4395acfab46c /chrome/common | |
parent | c3a4bd9985658b8a5b229983a3ed85042005f0cf (diff) | |
download | chromium_src-c2316134f2d4c02d641e1f0f4ac1e61749313ab4.zip chromium_src-c2316134f2d4c02d641e1f0f4ac1e61749313ab4.tar.gz chromium_src-c2316134f2d4c02d641e1f0f4ac1e61749313ab4.tar.bz2 |
Refactor SafeBrowsingDatabase for transition to new file format.
Refactor old SafeBrowsingDatabase code to allow for transitioning from
the old SQLite-based store to a new SQLite-based store, and from there
to the final raw file-based store.
The intended rollout is:
- Rollout with SafeBrowsingDatabaseBloom (basically the old code).
- Rollout SafeBrowsingDatabase+SafeBrowsingStoreSqlite. This changes
much of the code, but not the file format, so revert is possible
without resync'ing everyone's store (unless the stores have been
corrupted or something).
- Rollout SafeBrowsingDatabase+SafeBrowsingStoreFile. This changes
the file format while the control code stays the same. Revert
requires resync.
- Rollout a big cleanup which removes dead code.
BUG=28647
TEST=Safe browsing continues to work.
Review URL: http://codereview.chromium.org/3141009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56592 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/chrome_constants.cc | 2 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 6 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc index c90e268..2cedf3d 100644 --- a/chrome/common/chrome_constants.cc +++ b/chrome/common/chrome_constants.cc @@ -89,7 +89,7 @@ const FilePath::CharType kFaviconsFilename[] = FPL("Favicons"); const FilePath::CharType kHistoryFilename[] = FPL("History"); const FilePath::CharType kLocalStateFilename[] = FPL("Local State"); const FilePath::CharType kPreferencesFilename[] = FPL("Preferences"); -const FilePath::CharType kSafeBrowsingFilename[] = FPL("Safe Browsing"); +const FilePath::CharType kSafeBrowsingFilename[] = FPL("Safe Browsing Bloom"); // WARNING: SingletonSocket can't contain spaces, because otherwise // chrome_process_util_linux would be broken. const FilePath::CharType kSingletonSocketFilename[] = FPL("SingletonSocket"); diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 630c4b7..605e740 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -857,6 +857,12 @@ const char kRestoreLastSession[] = "restore-last-session"; // Runs the plugin processes inside the sandbox. const char kSafePlugins[] = "safe-plugins"; +// Select the safe-browsing database storage. "old" for the original +// SQLite-based SafeBrowsingDatabaseBloom, "newsqlite" for the new +// SQLite-based SafeBrowsingDatabase+SafeBrowsingStoreSQLite, and +// "newfile" for SafeBrowsingDatabase+SafeBrowsingStoreFile. +const char kSafeBrowsingDatabaseStore[] = "safe-browsing-database-store"; + // URL prefix used by safebrowsing to fetch hash, download data and // report malware. const char kSbInfoURLPrefix[] = "safebrowsing-info-url-prefix"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 9591d5c..bf1b4b7 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -248,6 +248,7 @@ extern const char kRendererStartupDialog[]; extern const char kRestoreBackgroundContents[]; extern const char kRestoreLastSession[]; extern const char kSafePlugins[]; +extern const char kSafeBrowsingDatabaseStore[]; extern const char kSbInfoURLPrefix[]; extern const char kSbMacKeyURLPrefix[]; extern const char kSbDisableAutoUpdate[]; |