diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-28 23:36:09 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-28 23:36:09 +0000 |
commit | b1094256d59efa38d1b548d1e282e541db6efef1 (patch) | |
tree | 46f889dbe50bfa743fbaf2e5fd6e1445c138a625 /chrome/browser/safe_browsing/protocol_manager.cc | |
parent | 42197a2a59f7d74ab299dce1be5c7831c3bf49b0 (diff) | |
download | chromium_src-b1094256d59efa38d1b548d1e282e541db6efef1.zip chromium_src-b1094256d59efa38d1b548d1e282e541db6efef1.tar.gz chromium_src-b1094256d59efa38d1b548d1e282e541db6efef1.tar.bz2 |
Consolidate some safe-browsing histograms.
Combine SB2.GetHash200 and SB2.GetHash204 into SB2.GetHashResult enum.
Rework SB2.GetHashServerMiss to increment only once per request,
rather than for each client. Also fold it into SB2.GetHashResult.
BUG=none
TEST=Monitor histograms.
Review URL: http://codereview.chromium.org/6025005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70243 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/protocol_manager.cc')
-rw-r--r-- | chrome/browser/safe_browsing/protocol_manager.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/safe_browsing/protocol_manager.cc b/chrome/browser/safe_browsing/protocol_manager.cc index 8e29489..69f8583 100644 --- a/chrome/browser/safe_browsing/protocol_manager.cc +++ b/chrome/browser/safe_browsing/protocol_manager.cc @@ -125,6 +125,12 @@ SafeBrowsingProtocolManager::SafeBrowsingProtocolManager( version_ = version_info.Version(); } +// static +void SafeBrowsingProtocolManager::RecordGetHashResult(ResultType result_type) { + UMA_HISTOGRAM_ENUMERATION("SB2.GetHashResult", result_type, + GET_HASH_RESULT_MAX); +} + SafeBrowsingProtocolManager::~SafeBrowsingProtocolManager() { // Delete in-progress SafeBrowsing requests. STLDeleteContainerPairFirstPointers(hash_requests_.begin(), @@ -225,9 +231,9 @@ void SafeBrowsingProtocolManager::OnURLFetchComplete( // For tracking our GetHash false positive (204) rate, compared to real // (200) responses. if (response_code == 200) - UMA_HISTOGRAM_COUNTS("SB2.GetHash200", 1); + RecordGetHashResult(GET_HASH_STATUS_200); else - UMA_HISTOGRAM_COUNTS("SB2.GetHash204", 1); + RecordGetHashResult(GET_HASH_STATUS_204); can_cache = true; gethash_error_count_ = 0; gethash_back_off_mult_ = 1; |