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

Unified Diff: components/safe_browsing_db/v4_store.h

Issue 2148673002: Parse the hash prefix map from the V4Store on disk. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@01_merge_only
Patch Set: git fetch && git pull && gclient sync Created 4 years, 5 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') | components/safe_browsing_db/v4_store.cc » ('J')
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 31b383634de68958adcce1adfbf39a8830ffb70a..b88d0f0f18104372b049c45e621bdac436d44c9a 100644
--- a/components/safe_browsing_db/v4_store.h
+++ b/components/safe_browsing_db/v4_store.h
@@ -69,6 +69,9 @@ enum StoreReadResult {
// disk or if there was disk corruption.
HASH_PREFIX_INFO_MISSING_FAILURE = 7,
+ // Unable to generate the hash prefix map from the updates on disk.
+ HASH_PREFIX_MAP_GENERATION_FAILURE = 8,
+
// Memory space for histograms is determined by the max. ALWAYS
// ADD NEW VALUES BEFORE THIS ONE.
STORE_READ_RESULT_MAX
@@ -193,6 +196,10 @@ class V4Store {
TestMergeUpdatesAdditionsMapRunsOutFirst);
FRIEND_TEST_ALL_PREFIXES(V4StoreTest,
TestMergeUpdatesFailsForRepeatedhashPrefix);
+ FRIEND_TEST_ALL_PREFIXES(V4StoreTest,
+ TestReadFullResponseWithValidHashPrefixMap);
+ FRIEND_TEST_ALL_PREFIXES(V4StoreTest,
+ TestReadFullResponseInWithValidHashPrefixMap);
// If |prefix_size| is within expected range, and |raw_hashes| is not invalid,
// then it sets |raw_hashes| as the value at key |prefix_size| in
« no previous file with comments | « no previous file | components/safe_browsing_db/v4_store.cc » ('j') | components/safe_browsing_db/v4_store.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698