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

Side by Side Diff: chrome/browser/net/cache_stats.cc

Issue 10829113: Fix CacheStats histogram name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 "chrome/browser/net/cache_stats.h" 5 #include "chrome/browser/net/cache_stats.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/timer.h" 10 #include "base/timer.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 for (int i = 0; 158 for (int i = 0;
159 i < static_cast<int>(arraysize(kStatsCollectionTimesMs)); 159 i < static_cast<int>(arraysize(kStatsCollectionTimesMs));
160 i++) { 160 i++) {
161 final_histograms_.push_back( 161 final_histograms_.push_back(
162 base::LinearHistogram::FactoryGet( 162 base::LinearHistogram::FactoryGet(
163 "CacheStats.FractionCacheUseFinalPLT_" + 163 "CacheStats.FractionCacheUseFinalPLT_" +
164 base::IntToString(kStatsCollectionTimesMs[i]), 164 base::IntToString(kStatsCollectionTimesMs[i]),
165 0, 101, 102, base::Histogram::kUmaTargetedHistogramFlag)); 165 0, 101, 102, base::Histogram::kUmaTargetedHistogramFlag));
166 intermediate_histograms_.push_back( 166 intermediate_histograms_.push_back(
167 base::LinearHistogram::FactoryGet( 167 base::LinearHistogram::FactoryGet(
168 "DiskCache.FractionCacheUseIntermediatePLT_" + 168 "CacheStats.FractionCacheUseIntermediatePLT_" +
169 base::IntToString(kStatsCollectionTimesMs[i]), 169 base::IntToString(kStatsCollectionTimesMs[i]),
170 0, 101, 102, base::Histogram::kNoFlags)); 170 0, 101, 102, base::Histogram::kUmaTargetedHistogramFlag));
171 } 171 }
172 DCHECK_EQ(final_histograms_.size(), arraysize(kStatsCollectionTimesMs)); 172 DCHECK_EQ(final_histograms_.size(), arraysize(kStatsCollectionTimesMs));
173 DCHECK_EQ(intermediate_histograms_.size(), 173 DCHECK_EQ(intermediate_histograms_.size(),
174 arraysize(kStatsCollectionTimesMs)); 174 arraysize(kStatsCollectionTimesMs));
175 } 175 }
176 176
177 CacheStats::~CacheStats() { 177 CacheStats::~CacheStats() {
178 STLDeleteValues(&tab_load_stats_); 178 STLDeleteValues(&tab_load_stats_);
179 } 179 }
180 180
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 if (type == ChromeURLRequestContext::CONTEXT_TYPE_MAIN) 333 if (type == ChromeURLRequestContext::CONTEXT_TYPE_MAIN)
334 main_request_contexts_.insert(context); 334 main_request_contexts_.insert(context);
335 } 335 }
336 336
337 void CacheStats::UnregisterURLRequestContext( 337 void CacheStats::UnregisterURLRequestContext(
338 const net::URLRequestContext* context) { 338 const net::URLRequestContext* context) {
339 main_request_contexts_.erase(context); 339 main_request_contexts_.erase(context);
340 } 340 }
341 341
342 } // namespace chrome_browser_net 342 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698