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

Side by Side Diff: chrome/browser/predictors/resource_prefetch_predictor.cc

Issue 1358513003: Use correct IntToString variants in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/predictors/resource_prefetch_predictor.h" 5 #include "chrome/browser/predictors/resource_prefetch_predictor.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 } else if (it->second) { 1238 } else if (it->second) {
1239 ++prefetch_cached; 1239 ++prefetch_cached;
1240 } else { 1240 } else {
1241 ++prefetch_network; 1241 ++prefetch_network;
1242 } 1242 }
1243 } 1243 }
1244 1244
1245 std::string prefix = key_type == PREFETCH_KEY_TYPE_HOST ? 1245 std::string prefix = key_type == PREFETCH_KEY_TYPE_HOST ?
1246 "ResourcePrefetchPredictor.Host.Predicted" : 1246 "ResourcePrefetchPredictor.Host.Predicted" :
1247 "ResourcePrefetchPredictor.Url.Predicted"; 1247 "ResourcePrefetchPredictor.Url.Predicted";
1248 std::string suffix = "_" + base::IntToString(max_assumed_prefetched); 1248 std::string suffix = "_" + base::SizeTToString(max_assumed_prefetched);
1249 1249
1250 // Macros to avoid using the STATIC_HISTOGRAM_POINTER_BLOCK in UMA_HISTOGRAM 1250 // Macros to avoid using the STATIC_HISTOGRAM_POINTER_BLOCK in UMA_HISTOGRAM
1251 // definitions. 1251 // definitions.
1252 #define RPP_PREDICTED_HISTOGRAM_COUNTS(name, value) \ 1252 #define RPP_PREDICTED_HISTOGRAM_COUNTS(name, value) \
1253 { \ 1253 { \
1254 std::string full_name = prefix + name + suffix; \ 1254 std::string full_name = prefix + name + suffix; \
1255 base::HistogramBase* histogram = base::Histogram::FactoryGet( \ 1255 base::HistogramBase* histogram = base::Histogram::FactoryGet( \
1256 full_name, 1, 1000000, 50, \ 1256 full_name, 1, 1000000, 50, \
1257 base::Histogram::kUmaTargetedHistogramFlag); \ 1257 base::Histogram::kUmaTargetedHistogramFlag); \
1258 histogram->Add(value); \ 1258 histogram->Add(value); \
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 // HistoryService is already loaded. Continue with Initialization. 1334 // HistoryService is already loaded. Continue with Initialization.
1335 OnHistoryAndCacheLoaded(); 1335 OnHistoryAndCacheLoaded();
1336 return; 1336 return;
1337 } 1337 }
1338 DCHECK(!history_service_observer_.IsObserving(history_service)); 1338 DCHECK(!history_service_observer_.IsObserving(history_service));
1339 history_service_observer_.Add(history_service); 1339 history_service_observer_.Add(history_service);
1340 return; 1340 return;
1341 } 1341 }
1342 1342
1343 } // namespace predictors 1343 } // namespace predictors
OLDNEW
« no previous file with comments | « chrome/browser/media/webrtc_logging_handler_host.cc ('k') | chrome/browser/profile_resetter/automatic_profile_resetter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698