diff options
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() |