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

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: Tiniest: typo: h->H 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') | 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 31b383634de68958adcce1adfbf39a8830ffb70a..c2118b4ae62f3502a00db5afac363cdb4a3eed80 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
@@ -192,7 +195,11 @@ class V4Store {
FRIEND_TEST_ALL_PREFIXES(V4StoreTest,
TestMergeUpdatesAdditionsMapRunsOutFirst);
FRIEND_TEST_ALL_PREFIXES(V4StoreTest,
- TestMergeUpdatesFailsForRepeatedhashPrefix);
+ TestMergeUpdatesFailsForRepeatedHashPrefix);
+ FRIEND_TEST_ALL_PREFIXES(V4StoreTest,
+ TestReadFullResponseWithValidHashPrefixMap);
+ FRIEND_TEST_ALL_PREFIXES(V4StoreTest,
+ TestReadFullResponseWithInvalidHashPrefixMap);
// 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698