Chromium Code Reviews| Index: components/safe_browsing_db/v4_protocol_manager_util.h |
| diff --git a/components/safe_browsing_db/v4_protocol_manager_util.h b/components/safe_browsing_db/v4_protocol_manager_util.h |
| index f4665f00587fc979ddbab8bb19c4530b87cd4287..b7df61a152216707ba049d6331c1fdad42c5f9a2 100644 |
| --- a/components/safe_browsing_db/v4_protocol_manager_util.h |
| +++ b/components/safe_browsing_db/v4_protocol_manager_util.h |
| @@ -11,10 +11,37 @@ |
| #include <string> |
| #include "base/gtest_prod_util.h" |
| +#include "components/safe_browsing_db/safebrowsing.pb.h" |
| #include "net/url_request/url_request_status.h" |
| #include "url/gurl.h" |
| namespace safe_browsing { |
| +// Enumerate failures for histogramming purposes. DO NOT CHANGE THE |
| +// ORDERING OF THESE VALUES. |
| +enum OperationResultType { |
| + // 200 response code means that the server recognized the hash |
| + // prefix. |
| + ORT_STATUS_200 = 0, |
| + |
| + // Subset of successful responses where the response body wasn't parsable. |
| + ORT_PARSE_ERROR = 1, |
| + |
| + // Gethash request failed (network error). |
| + ORT_NETWORK_ERROR = 2, |
| + |
| + // Gethash request returned HTTP result code other than 200. |
| + ORT_HTTP_ERROR = 3, |
| + |
| + // Gethash attempted during error backoff, no request sent. |
| + ORT_BACKOFF_ERROR = 4, |
| + |
| + // Gethash attempted before min wait duration elapsed, no request sent. |
| + ORT_MIN_WAIT_DURATION_ERROR = 5, |
| + |
| + // Memory space for histograms is determined by the max. ALWAYS |
| + // ADD NEW VALUES BEFORE THIS ONE. |
| + OPERATION_RESULT_TYPE_MAX = 6 |
| +}; |
| // Config passed to the constructor of a V4 protocol manager. |
| struct V4ProtocolConfig { |
| @@ -28,6 +55,12 @@ struct V4ProtocolConfig { |
| std::string key_param; |
| }; |
| +struct UpdateListIdentifier { |
|
Nathan Parker
2016/02/23 18:47:06
Is this the key for the list, like in the map of k
vakh (use Gerrit instead)
2016/02/24 03:25:56
Done.
|
| + ThreatType threat_type; |
| + PlatformType platform_type; |
| + ThreatEntryType threat_entry_type; |
| +}; |
| + |
| class V4ProtocolManagerUtil { |
| public: |
| // Record HTTP response code when there's no error in fetching an HTTP |