diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-15 01:06:53 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-15 01:06:53 +0000 |
commit | d8fd513cd610568904212fa0d2a0de523d85a2ff (patch) | |
tree | 2025a97ba0925f3b3494baaa30e3dfe186b8f199 /net/base/sdch_manager.cc | |
parent | 96c77a6d2bf1e573e48748b54c8bf3c7aa4c9d96 (diff) | |
download | chromium_src-d8fd513cd610568904212fa0d2a0de523d85a2ff.zip chromium_src-d8fd513cd610568904212fa0d2a0de523d85a2ff.tar.gz chromium_src-d8fd513cd610568904212fa0d2a0de523d85a2ff.tar.bz2 |
Adjust histograms to only collect non-cache stats for SDCH.
I also changed the name of all the SDCH histograms so that
there would be no confusion about the data.
I also added one new problem code, but that recordation
doesn't have any semantic impact. I added it to help
make it easier to diagnose dictionary specification
errors in SDCH.
bug=12012
R=wtc
Review URL: http://codereview.chromium.org/115377
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16138 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/sdch_manager.cc')
-rw-r--r-- | net/base/sdch_manager.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/base/sdch_manager.cc b/net/base/sdch_manager.cc index 05b6475..7de9f0b 100644 --- a/net/base/sdch_manager.cc +++ b/net/base/sdch_manager.cc @@ -32,7 +32,7 @@ SdchManager* SdchManager::Global() { // static void SdchManager::SdchErrorRecovery(ProblemCodes problem) { - static LinearHistogram histogram("Sdch2.ProblemCodes_3", MIN_PROBLEM_CODE, + static LinearHistogram histogram("Sdch3.ProblemCodes_3", MIN_PROBLEM_CODE, MAX_PROBLEM_CODE - 1, MAX_PROBLEM_CODE); histogram.SetFlags(kUmaTargetedHistogramFlag); histogram.Add(problem); @@ -272,7 +272,7 @@ bool SdchManager::AddSdchDictionary(const std::string& dictionary_text, return false; } - UMA_HISTOGRAM_COUNTS("Sdch2.Dictionary size loaded", dictionary_text.size()); + UMA_HISTOGRAM_COUNTS("Sdch3.Dictionary size loaded", dictionary_text.size()); DLOG(INFO) << "Loaded dictionary with client hash " << client_hash << " and server hash " << server_hash; Dictionary* dictionary = @@ -313,7 +313,7 @@ void SdchManager::GetAvailDictionaryList(const GURL& target_url, } // Watch to see if we have corrupt or numerous dictionaries. if (count > 0) - UMA_HISTOGRAM_COUNTS("Sdch2.Advertisement_Count", count); + UMA_HISTOGRAM_COUNTS("Sdch3.Advertisement_Count", count); } SdchManager::Dictionary::Dictionary(const std::string& dictionary_text, @@ -413,8 +413,10 @@ bool SdchManager::Dictionary::CanSet(const std::string& domain, // It is a postfix... so check to see if there's a dot in the prefix. size_t end_of_host_index = referrer_url_host.find_first_of('.'); if (referrer_url_host.npos != end_of_host_index && - end_of_host_index < postfix_domain_index) + end_of_host_index < postfix_domain_index) { + SdchErrorRecovery(DICTIONARY_REFERER_URL_HAS_DOT_IN_PREFIX); return false; + } } if (!ports.empty() |