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

Unified Diff: components/safe_browsing_db/v4_get_hash_protocol_manager.h

Issue 1719883003: Ignore: v4_update_protocol_manager: Basic implementation with TODOs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v4_01_prot_mgr
Patch Set: rebase again (and more branching funkiness) Created 4 years, 10 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: components/safe_browsing_db/v4_get_hash_protocol_manager.h
diff --git a/components/safe_browsing_db/v4_get_hash_protocol_manager.h b/components/safe_browsing_db/v4_get_hash_protocol_manager.h
index f0bfc7410c0ad5d91c6d89882e944b40cee06441..398fd03beaf4816c255a09814895bdeee0a37c38 100644
--- a/components/safe_browsing_db/v4_get_hash_protocol_manager.h
+++ b/components/safe_browsing_db/v4_get_hash_protocol_manager.h
@@ -48,6 +48,8 @@ class V4GetHashProtocolManager : public net::URLFetcherDelegate,
const base::TimeDelta&)>
FullHashCallback;
+ typedef V4ProtocolManagerUtil::OperationResultType OperationResultType;
+
~V4GetHashProtocolManager() override;
// Makes the passed |factory| the factory used to instantiate
@@ -78,35 +80,8 @@ class V4GetHashProtocolManager : public net::URLFetcherDelegate,
virtual void GetFullHashesWithApis(const std::vector<SBPrefix>& prefixes,
FullHashCallback callback);
- // Enumerate failures for histogramming purposes. DO NOT CHANGE THE
- // ORDERING OF THESE VALUES.
- enum ResultType {
- // 200 response code means that the server recognized the hash
- // prefix.
- GET_HASH_STATUS_200 = 0,
-
- // Subset of successful responses where the response body wasn't parsable.
- GET_HASH_PARSE_ERROR = 1,
-
- // Gethash request failed (network error).
- GET_HASH_NETWORK_ERROR = 2,
-
- // Gethash request returned HTTP result code other than 200.
- GET_HASH_HTTP_ERROR = 3,
-
- // Gethash attempted during error backoff, no request sent.
- GET_HASH_BACKOFF_ERROR = 4,
-
- // Gethash attempted before min wait duration elapsed, no request sent.
- GET_HASH_MIN_WAIT_DURATION_ERROR = 5,
-
- // Memory space for histograms is determined by the max. ALWAYS
- // ADD NEW VALUES BEFORE THIS ONE.
- GET_HASH_RESULT_MAX = 6
- };
-
// Record a GetHash result.
- static void RecordGetHashResult(ResultType result_type);
+ static void RecordGetHashResult(OperationResultType result_type);
protected:
// Constructs a V4GetHashProtocolManager that issues
« no previous file with comments | « components/safe_browsing_db/database_manager.cc ('k') | components/safe_browsing_db/v4_get_hash_protocol_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698