Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7535)

Unified Diff: chrome/browser/safe_browsing/safe_browsing_database.h

Issue 11615011: Small modifications to safebrowsing code to make it simpler to add the extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
SafeBrowsingStore* GetStore(int list_id);
- // Deletes the files on disk.
+ // Deletes the files on disk.
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_;
not at google - send to devlin 2012/12/18 00:48:46 Not sure about this change. It means that the Upda
// Used to check if a prefix was in the database.
FilePath prefix_set_filename_;

Powered by Google App Engine
This is Rietveld 408576698