Index: chrome/browser/safe_browsing/protocol_manager.h |
diff --git a/chrome/browser/safe_browsing/protocol_manager.h b/chrome/browser/safe_browsing/protocol_manager.h |
index 63a151fa18fdbe6702c218b3f1c56d38797754fd..be6518dc5e37fefd894a3fde74ea0a1559bb1531 100644 |
--- a/chrome/browser/safe_browsing/protocol_manager.h |
+++ b/chrome/browser/safe_browsing/protocol_manager.h |
@@ -203,6 +203,14 @@ class SafeBrowsingProtocolManager : public net::URLFetcherDelegate, |
FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, |
TestGetV4HashRequest); |
FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, |
+ TestParseV4HashResponse); |
+ FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, |
+ TestParseV4HashResponseWrongThreatEntryType); |
+ FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, |
+ TestParseV4HashResponseSocialEngineeringThreatType); |
+ FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, |
+ TestParseV4HashResponseNonPermissionMetadata); |
+ FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, |
TestGetHashBackOffTimes); |
FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestNextChunkUrl); |
FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestUpdateUrl); |
@@ -243,11 +251,19 @@ class SafeBrowsingProtocolManager : public net::URLFetcherDelegate, |
// encoded in base 64. |
GURL GetV4HashUrl(const std::string& request_base64) const; |
- // Fills a FindFullHashesRequest protocol buffer for an API_ABUSE request. |
+ // Fills a FindFullHashesRequest protocol buffer for a V4 request. |
// Returns the serialized and base 64 encoded request as a string. |
std::string GetV4HashRequest(const std::vector<SBPrefix>& prefixes, |
ThreatType threat_type); |
+ // Parses a FindFullHashesResponse protocol buffer and fills the results in |
+ // |full_hashes| and |cache_lifetime|. |data_base64| is the base 64 encoded |
awoz
2015/12/30 18:23:13
Can you explain what |cache_lifetime| is? It's unc
kcarattini
2016/01/04 00:52:01
Done.
|
+ // string of a serialized FindFullHashes procol buffer. Returns true if |
awoz
2015/12/30 18:23:13
s/procol/protocol
kcarattini
2016/01/04 00:52:01
Done.
|
+ // parsing is successfull, false otherwise. |
awoz
2015/12/30 18:23:13
s/successfull/successful
kcarattini
2016/01/04 00:52:01
Done.
|
+ bool ParseV4HashResponse(const std::string& data_base64, |
+ std::vector<SBFullHashResult>* full_hashes, |
+ base::TimeDelta* cache_lifetime); |
+ |
// Composes a ChunkUrl based on input string. |
GURL NextChunkUrl(const std::string& input) const; |