Chromium Code Reviews| Index: chrome/browser/safe_browsing/safe_browsing_database.h |
| diff --git a/chrome/browser/safe_browsing/safe_browsing_database.h b/chrome/browser/safe_browsing/safe_browsing_database.h |
| index 07346c9b77015c73e872df7be2d6a41ad8ced76f..4664a8589eba9f0efb660dc3cc9935a61ba5623f 100644 |
| --- a/chrome/browser/safe_browsing/safe_browsing_database.h |
| +++ b/chrome/browser/safe_browsing/safe_browsing_database.h |
| @@ -268,11 +268,11 @@ class SafeBrowsingDatabaseNew : public SafeBrowsingDatabase { |
| bool ContainsWhitelistedHashes(const SBWhitelist& whitelist, |
| const std::vector<SBFullHash>& hashes); |
| - // Return the browse_store_, download_store_, download_whitelist_store or |
| - // csd_whitelist_store_ based on list_id. |
| + // Return the browse_store_, download_store_, download_whitelist_store, |
| + // or csd_whitelist_store_ based on list_id. |
|
Scott Hess - ex-Googler
2013/01/11 23:44:05
Egregious formatting change is egregious.
not at google - send to devlin
2013/01/14 23:00:55
Done.
|
| SafeBrowsingStore* GetStore(int list_id); |
| - // Deletes the files on disk. |
| + // Deletes the files on disk. |
|
Scott Hess - ex-Googler
2013/01/11 23:44:05
Though this one isn't.
|
| bool Delete(); |
| // Load the prefix set off disk, if available. |
| @@ -303,9 +303,11 @@ class SafeBrowsingDatabaseNew : public SafeBrowsingDatabase { |
| // Helpers for InsertChunks(). |
| void InsertAdd(int chunk, SBPrefix host, const SBEntry* entry, int list_id); |
| - void InsertAddChunks(int list_id, const SBChunkList& chunks); |
| + void InsertAddChunks(safe_browsing_util::ListType list_id, |
| + const SBChunkList& chunks); |
| void InsertSub(int chunk, SBPrefix host, const SBEntry* entry, int list_id); |
| - void InsertSubChunks(int list_id, const SBChunkList& chunks); |
| + void InsertSubChunks(safe_browsing_util::ListType list_id, |
| + const SBChunkList& chunks); |
| void UpdateDownloadStore(); |
| void UpdateBrowseStore(); |
| @@ -313,15 +315,6 @@ class SafeBrowsingDatabaseNew : public SafeBrowsingDatabase { |
| SafeBrowsingStore* store, |
| SBWhitelist* whitelist); |
| - // Helper function to compare addprefixes in download_store_ with |prefixes|. |
| - // The |list_bit| indicates which list (download url or download hash) |
| - // to compare. |
| - // Returns true if there is a match, |*prefix_hits| will contain the actual |
| - // matching prefixes. |
| - bool MatchDownloadAddPrefixes(int list_bit, |
| - const std::vector<SBPrefix>& prefixes, |
| - std::vector<SBPrefix>* prefix_hits); |
| - |
| // Used to verify that various calls are made from the thread the |
| // object was created on. |
| MessageLoop* creation_loop_; |
| @@ -375,9 +368,8 @@ class SafeBrowsingDatabaseNew : public SafeBrowsingDatabase { |
| // the next call to |UpdateStarted()|. |
| bool corruption_detected_; |
| - // Set to true if any chunks are added or deleted during an update. |
| - // Used to optimize away database update. |
| - bool change_detected_; |
| + // Contains the IDs of stores which changed during an update. |
| + std::set<safe_browsing_util::ListType> changes_detected_; |
|
Scott Hess - ex-Googler
2013/01/11 23:44:05
As with the earlier CL we were discussing, I still
not at google - send to devlin
2013/01/14 23:00:55
The "external data structure" for extensions is th
Scott Hess - ex-Googler
2013/01/17 19:24:42
The update frequency is once every 45 minutes, and
|
| // Used to check if a prefix was in the database. |
| FilePath prefix_set_filename_; |