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

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: Address more comments 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>
7 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
8 9
9 namespace nacl { 10 namespace nacl {
10 11
11 void HistogramCustomCounts(const std::string& name, 12 void HistogramCustomCounts(const std::string& name,
12 int32_t sample, 13 int32_t sample,
13 int32_t min, 14 int32_t min,
14 int32_t max, 15 int32_t max,
15 uint32_t bucket_count) { 16 uint32_t bucket_count) {
16 base::HistogramBase* counter = 17 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. 206 static const int32_t kRatioMax = 10 * 100; // max of 10x difference.
206 static const uint32_t kRatioBuckets = 100; 207 static const uint32_t kRatioBuckets = 100;
207 if (numerator < 0 || denominator <= 0) 208 if (numerator < 0 || denominator <= 0)
208 return; 209 return;
209 HistogramCustomCounts(name, 210 HistogramCustomCounts(name,
210 static_cast<int32_t>(100 * numerator / denominator), 211 static_cast<int32_t>(100 * numerator / denominator),
211 kRatioMin, kRatioMax, kRatioBuckets); 212 kRatioMin, kRatioMax, kRatioBuckets);
212 } 213 }
213 214
214 } // namespace nacl 215 } // namespace nacl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698