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

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

Issue 220493003: Safebrowsing: change gethash caching to match api 2.3 rules, fix some corner cases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (including 227613008) Created 6 years, 8 months 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_store_file.h
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file.h b/chrome/browser/safe_browsing/safe_browsing_store_file.h
index 22863f23a371477dd2a29e19e681e2bfec80f28c..acd477964146e1d9f194868aa8110b86b79953fb 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_file.h
+++ b/chrome/browser/safe_browsing/safe_browsing_store_file.h
@@ -143,7 +143,6 @@ class SafeBrowsingStoreFile : public SafeBrowsingStore {
virtual bool WriteAddPrefix(int32 chunk_id, SBPrefix prefix) OVERRIDE;
virtual bool WriteAddHash(int32 chunk_id,
- base::Time receive_time,
const SBFullHash& full_hash) OVERRIDE;
virtual bool WriteSubPrefix(int32 chunk_id,
int32 add_chunk_id, SBPrefix prefix) OVERRIDE;
@@ -152,10 +151,9 @@ class SafeBrowsingStoreFile : public SafeBrowsingStore {
virtual bool FinishChunk() OVERRIDE;
virtual bool BeginUpdate() OVERRIDE;
- // Store updates with pending add full hashes in file store and
- // return |add_prefixes_result| and |add_full_hashes_result|.
+ // Store updates in file store. Kept prefixes will be added to |builder| and
+ // kept full hashes to |add_full_hashes_result|.
virtual bool FinishUpdate(
- const std::vector<SBAddFullHash>& pending_adds,
safe_browsing::PrefixSetBuilder* builder,
std::vector<SBAddFullHash>* add_full_hashes_result) OVERRIDE;
virtual bool CancelUpdate() OVERRIDE;
@@ -185,9 +183,8 @@ class SafeBrowsingStoreFile : public SafeBrowsingStore {
static bool DeleteStore(const base::FilePath& basename);
private:
- // Update store file with pending full hashes.
- virtual bool DoUpdate(const std::vector<SBAddFullHash>& pending_adds,
- safe_browsing::PrefixSetBuilder* builder,
+ // Update store file and return |add_full_hashes_result|.
+ virtual bool DoUpdate(safe_browsing::PrefixSetBuilder* builder,
std::vector<SBAddFullHash>* add_full_hashes_result);
// Some very lucky users have an original-format file still in their
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_store.h ('k') | chrome/browser/safe_browsing/safe_browsing_store_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698