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

Unified Diff: components/safe_browsing_db/v4_store.h

Issue 2403913004: Small: Serialize the store's hash_prefix_map_ to file in WriteToDisk() (Closed)
Patch Set: rebase. and temporary scope to make sure that |contents| get destroyed as soon as we're done using … Created 4 years, 2 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
« no previous file with comments | « no previous file | components/safe_browsing_db/v4_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing_db/v4_store.h
diff --git a/components/safe_browsing_db/v4_store.h b/components/safe_browsing_db/v4_store.h
index 3c6ea9d0d9b9fd2700dec7877efd609d7b1f7c48..befa6f9b0c178a0eabfb16853c0874448d4a580d 100644
--- a/components/safe_browsing_db/v4_store.h
+++ b/components/safe_browsing_db/v4_store.h
@@ -255,6 +255,7 @@ class V4Store {
FRIEND_TEST_ALL_PREFIXES(V4StoreTest, TestRemovalsWithRiceEncodingSucceeds);
FRIEND_TEST_ALL_PREFIXES(V4StoreTest, TestMergeUpdatesFailsChecksum);
FRIEND_TEST_ALL_PREFIXES(V4StoreTest, TestChecksumErrorOnStartup);
+ FRIEND_TEST_ALL_PREFIXES(V4StoreTest, WriteToDiskFails);
friend class V4StoreTest;
// If |prefix_size| is within expected range, and |raw_hashes_length| is a
@@ -361,9 +362,9 @@ class V4Store {
const ::google::protobuf::RepeatedPtrField<ThreatEntrySet>& additions,
HashPrefixMap* additions_map);
- // Writes the FULL_UPDATE |response| to disk as a V4StoreFileFormat proto.
- StoreWriteResult WriteToDisk(
- std::unique_ptr<ListUpdateResponse> response) const;
+ // Writes the hash_prefix_map_ to disk as a V4StoreFileFormat proto.
+ // |checksum| is used to set the |checksum| field in the final proto.
+ StoreWriteResult WriteToDisk(const Checksum& checksum) const;
// The checksum value as read from the disk, until it is verified. Once
// verified, it is cleared.
« no previous file with comments | « no previous file | components/safe_browsing_db/v4_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698