Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: net/base/sdch_manager.cc

Issue 1137753006: sdch: add Sdch3.AdvertisedWithSecureScheme histogram (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add more detail for histogram Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/sdch_manager.h" 5 #include "net/base/sdch_manager.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 if (entry.second->data.Expired()) 275 if (entry.second->data.Expired())
276 continue; 276 continue;
277 ++count; 277 ++count;
278 result->AddDictionary(entry.first, entry.second); 278 result->AddDictionary(entry.first, entry.second);
279 } 279 }
280 280
281 if (count == 0) 281 if (count == 0)
282 return NULL; 282 return NULL;
283 283
284 UMA_HISTOGRAM_COUNTS("Sdch3.Advertisement_Count", count); 284 UMA_HISTOGRAM_COUNTS("Sdch3.Advertisement_Count", count);
285 UMA_HISTOGRAM_BOOLEAN("Sdch3.AdvertisedWithSecureScheme",
286 target_url.SchemeIsSecure());
285 287
286 return result.Pass(); 288 return result.Pass();
287 } 289 }
288 290
289 scoped_ptr<SdchManager::DictionarySet> 291 scoped_ptr<SdchManager::DictionarySet>
290 SdchManager::GetDictionarySetByHash( 292 SdchManager::GetDictionarySetByHash(
291 const GURL& target_url, 293 const GURL& target_url,
292 const std::string& server_hash, 294 const std::string& server_hash,
293 SdchProblemCode* problem_code) { 295 SdchProblemCode* problem_code) {
294 scoped_ptr<SdchManager::DictionarySet> result; 296 scoped_ptr<SdchManager::DictionarySet> result;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 entry_dict->SetInteger("tries", it->second.count); 519 entry_dict->SetInteger("tries", it->second.count);
518 entry_dict->SetInteger("reason", it->second.reason); 520 entry_dict->SetInteger("reason", it->second.reason);
519 entry_list->Append(entry_dict); 521 entry_list->Append(entry_dict);
520 } 522 }
521 value->Set("blacklisted", entry_list); 523 value->Set("blacklisted", entry_list);
522 524
523 return value; 525 return value;
524 } 526 }
525 527
526 } // namespace net 528 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698