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

Side by Side Diff: chrome/browser/metrics/perf/random_selector.h

Issue 1550593002: Switch to standard integer types in chrome/browser/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_METRICS_PERF_RANDOM_SELECTOR_H_ 5 #ifndef CHROME_BROWSER_METRICS_PERF_RANDOM_SELECTOR_H_
6 #define CHROME_BROWSER_METRICS_PERF_RANDOM_SELECTOR_H_ 6 #define CHROME_BROWSER_METRICS_PERF_RANDOM_SELECTOR_H_
7 7
8 #include <stddef.h>
9
8 #include <string> 10 #include <string>
9 #include <vector> 11 #include <vector>
10 12
11 #include "base/macros.h" 13 #include "base/macros.h"
12 14
13 // RandomSelector can be used to pick vectors of strings according to certain 15 // RandomSelector can be used to pick vectors of strings according to certain
14 // probabilities. The probabilities are set using SetOdds(). A randomly picked 16 // probabilities. The probabilities are set using SetOdds(). A randomly picked
15 // vector can be obtained by calling Select(). 17 // vector can be obtained by calling Select().
16 // 18 //
17 // Sample usage: 19 // Sample usage:
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Sum of the probability weights. 84 // Sum of the probability weights.
83 double sum_of_weights_; 85 double sum_of_weights_;
84 86
85 DISALLOW_COPY_AND_ASSIGN(RandomSelector); 87 DISALLOW_COPY_AND_ASSIGN(RandomSelector);
86 }; 88 };
87 89
88 ::std::ostream& operator<<( 90 ::std::ostream& operator<<(
89 ::std::ostream& os, const RandomSelector::WeightAndValue& value); 91 ::std::ostream& os, const RandomSelector::WeightAndValue& value);
90 92
91 #endif // CHROME_BROWSER_METRICS_PERF_RANDOM_SELECTOR_H_ 93 #endif // CHROME_BROWSER_METRICS_PERF_RANDOM_SELECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698