Commit 54733e1e authored by shess@chromium.org's avatar shess@chromium.org

[safe browsing] Remove most filename storage in database object.

Instead of storing full copies of every backing file's path, re-generate
the paths as needed.

BUG=none

Review URL: https://codereview.chromium.org/340893003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278605 0039d316-1c4b-4281-b951-d872f2087c98
parent 93e2c538
...@@ -418,35 +418,32 @@ class SafeBrowsingDatabaseNew : public SafeBrowsingDatabase { ...@@ -418,35 +418,32 @@ class SafeBrowsingDatabaseNew : public SafeBrowsingDatabase {
// |prefix_miss_cache_|, |csd_whitelist_|. // |prefix_miss_cache_|, |csd_whitelist_|.
base::Lock lookup_lock_; base::Lock lookup_lock_;
// The base filename passed to Init(), used to generate the store and prefix
// set filenames used to store data on disk.
base::FilePath filename_base_;
// Underlying persistent store for chunk data. // Underlying persistent store for chunk data.
// For browsing related (phishing and malware URLs) chunks and prefixes. // For browsing related (phishing and malware URLs) chunks and prefixes.
base::FilePath browse_filename_;
scoped_ptr<SafeBrowsingStore> browse_store_; scoped_ptr<SafeBrowsingStore> browse_store_;
// For download related (download URL and binary hash) chunks and prefixes. // For download related (download URL and binary hash) chunks and prefixes.
base::FilePath download_filename_;
scoped_ptr<SafeBrowsingStore> download_store_; scoped_ptr<SafeBrowsingStore> download_store_;
// For the client-side phishing detection whitelist chunks and full-length // For the client-side phishing detection whitelist chunks and full-length
// hashes. This list only contains 256 bit hashes. // hashes. This list only contains 256 bit hashes.
base::FilePath csd_whitelist_filename_;
scoped_ptr<SafeBrowsingStore> csd_whitelist_store_; scoped_ptr<SafeBrowsingStore> csd_whitelist_store_;
// For the download whitelist chunks and full-length hashes. This list only // For the download whitelist chunks and full-length hashes. This list only
// contains 256 bit hashes. // contains 256 bit hashes.
base::FilePath download_whitelist_filename_;
scoped_ptr<SafeBrowsingStore> download_whitelist_store_; scoped_ptr<SafeBrowsingStore> download_whitelist_store_;
// For extension IDs. // For extension IDs.
base::FilePath extension_blacklist_filename_;
scoped_ptr<SafeBrowsingStore> extension_blacklist_store_; scoped_ptr<SafeBrowsingStore> extension_blacklist_store_;
// For side-effect free whitelist. // For side-effect free whitelist.
base::FilePath side_effect_free_whitelist_filename_;
scoped_ptr<SafeBrowsingStore> side_effect_free_whitelist_store_; scoped_ptr<SafeBrowsingStore> side_effect_free_whitelist_store_;
// For IP blacklist. // For IP blacklist.
base::FilePath ip_blacklist_filename_;
scoped_ptr<SafeBrowsingStore> ip_blacklist_store_; scoped_ptr<SafeBrowsingStore> ip_blacklist_store_;
SBWhitelist csd_whitelist_; SBWhitelist csd_whitelist_;
...@@ -478,11 +475,9 @@ class SafeBrowsingDatabaseNew : public SafeBrowsingDatabase { ...@@ -478,11 +475,9 @@ class SafeBrowsingDatabaseNew : public SafeBrowsingDatabase {
bool change_detected_; bool change_detected_;
// Used to check if a prefix was in the browse database. // Used to check if a prefix was in the browse database.
base::FilePath browse_prefix_set_filename_;
scoped_ptr<safe_browsing::PrefixSet> browse_prefix_set_; scoped_ptr<safe_browsing::PrefixSet> browse_prefix_set_;
// Used to check if a prefix was in the browse database. // Used to check if a prefix was in the browse database.
base::FilePath side_effect_free_whitelist_prefix_set_filename_;
scoped_ptr<safe_browsing::PrefixSet> side_effect_free_whitelist_prefix_set_; scoped_ptr<safe_browsing::PrefixSet> side_effect_free_whitelist_prefix_set_;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment