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 7869e0f4ac666ec836f2a837f6b4af0d7b0f922c..0ef766a0dab85311731181403c098c8f8b106a41 100644 |
--- a/chrome/browser/safe_browsing/protocol_manager.h |
+++ b/chrome/browser/safe_browsing/protocol_manager.h |
@@ -158,6 +158,31 @@ class SafeBrowsingProtocolManager : public URLFetcher::Delegate { |
return additional_query_; |
} |
+ // Enumerate failures for histogramming purposes. DO NOT CHANGE THE |
+ // ORDERING OF THESE VALUES. |
+ enum ResultType { |
+ // A 204 response code means that the server did not know about |
+ // the hash prefix that was sent up. |
+ GET_HASH_STATUS_200, |
+ GET_HASH_STATUS_204, |
+ |
+ // Responses which returned no full hashes. This includes the 204 |
+ // case, and also 200 responses for prefixes which are logically |
Erik does not do reviews
2010/12/22 22:07:22
So should we split these up? GET_HASH_FULL_HASH_E
Scott Hess - ex-Googler
2010/12/22 22:13:20
My understanding is that every GET_HASH_STATUS_204
lzheng
2010/12/22 23:56:51
That's my understanding too. So, GET_HASH_FULL_HAS
|
+ // deleted at the server but not yet updated to the client. |
+ GET_HASH_FULL_HASH_EMPTY, |
+ |
+ // Subset of 200 responses for which one or more of the full |
+ // hashes matched. |
+ GET_HASH_FULL_HASH_HIT, |
+ |
+ // Memory space for histograms is determined by the max. ALWAYS |
+ // ADD NEW VALUES BEFORE THIS ONE. |
+ GET_HASH_RESULT_MAX |
+ }; |
+ |
+ // Record a GetHash result. |
+ static void RecordGetHashResult(ResultType result_type); |
+ |
protected: |
// Constructs a SafeBrowsingProtocolManager for |sb_service| that issues |
// network requests using |request_context_getter|. When |disable_auto_update| |