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

Side by Side Diff: components/nacl/renderer/histogram.cc

Issue 1445003002: Use std::default_delete as the default deleter for scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: How many trial and errors before this builds on the Windows bots Created 5 years, 1 month 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 "components/nacl/renderer/histogram.h" 5 #include "components/nacl/renderer/histogram.h"
6 6
7 #include <algorithm>
8
7 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
8 10
9 namespace nacl { 11 namespace nacl {
10 12
11 void HistogramCustomCounts(const std::string& name, 13 void HistogramCustomCounts(const std::string& name,
12 int32_t sample, 14 int32_t sample,
13 int32_t min, 15 int32_t min,
14 int32_t max, 16 int32_t max,
15 uint32_t bucket_count) { 17 uint32_t bucket_count) {
16 base::HistogramBase* counter = 18 base::HistogramBase* counter =
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 static const int32_t kRatioMax = 10 * 100; // max of 10x difference. 207 static const int32_t kRatioMax = 10 * 100; // max of 10x difference.
206 static const uint32_t kRatioBuckets = 100; 208 static const uint32_t kRatioBuckets = 100;
207 if (numerator < 0 || denominator <= 0) 209 if (numerator < 0 || denominator <= 0)
208 return; 210 return;
209 HistogramCustomCounts(name, 211 HistogramCustomCounts(name,
210 static_cast<int32_t>(100 * numerator / denominator), 212 static_cast<int32_t>(100 * numerator / denominator),
211 kRatioMin, kRatioMax, kRatioBuckets); 213 kRatioMin, kRatioMax, kRatioBuckets);
212 } 214 }
213 215
214 } // namespace nacl 216 } // namespace nacl
OLDNEW
« no previous file with comments | « components/memory_pressure/filtered_memory_pressure_calculator.cc ('k') | components/proximity_auth/metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698