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

Side by Side Diff: components/variations/active_field_trials.h

Issue 1549993003: Switch to standard integer types in components/, part 4 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
« no previous file with comments | « components/user_prefs/user_prefs.h ('k') | components/variations/active_field_trials.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef COMPONENTS_VARIATIONS_ACTIVE_FIELD_TRIALS_H_ 5 #ifndef COMPONENTS_VARIATIONS_ACTIVE_FIELD_TRIALS_H_
6 #define COMPONENTS_VARIATIONS_ACTIVE_FIELD_TRIALS_H_ 6 #define COMPONENTS_VARIATIONS_ACTIVE_FIELD_TRIALS_H_
7 7
8 #include <stdint.h>
9
8 #include <string> 10 #include <string>
9 11
10 #include "base/basictypes.h"
11 #include "base/metrics/field_trial.h" 12 #include "base/metrics/field_trial.h"
12 13
13 namespace variations { 14 namespace variations {
14 15
15 // The Unique ID of a trial and its active group, where the name and group 16 // The Unique ID of a trial and its active group, where the name and group
16 // identifiers are hashes of the trial and group name strings. 17 // identifiers are hashes of the trial and group name strings.
17 struct ActiveGroupId { 18 struct ActiveGroupId {
18 uint32 name; 19 uint32_t name;
19 uint32 group; 20 uint32_t group;
20 }; 21 };
21 22
22 // Returns an ActiveGroupId struct for the given trial and group names. 23 // Returns an ActiveGroupId struct for the given trial and group names.
23 ActiveGroupId MakeActiveGroupId(const std::string& trial_name, 24 ActiveGroupId MakeActiveGroupId(const std::string& trial_name,
24 const std::string& group_name); 25 const std::string& group_name);
25 26
26 // We need to supply a Compare class for templates since ActiveGroupId is a 27 // We need to supply a Compare class for templates since ActiveGroupId is a
27 // user-defined type. 28 // user-defined type.
28 struct ActiveGroupIdCompare { 29 struct ActiveGroupIdCompare {
29 bool operator() (const ActiveGroupId& lhs, const ActiveGroupId& rhs) const { 30 bool operator() (const ActiveGroupId& lhs, const ActiveGroupId& rhs) const {
(...skipping 25 matching lines...) Expand all
55 56
56 void TestGetFieldTrialActiveGroupIds( 57 void TestGetFieldTrialActiveGroupIds(
57 const base::FieldTrial::ActiveGroups& active_groups, 58 const base::FieldTrial::ActiveGroups& active_groups,
58 std::vector<ActiveGroupId>* name_group_ids); 59 std::vector<ActiveGroupId>* name_group_ids);
59 60
60 } // namespace testing 61 } // namespace testing
61 62
62 } // namespace variations 63 } // namespace variations
63 64
64 #endif // COMPONENTS_VARIATIONS_ACTIVE_FIELD_TRIALS_H_ 65 #endif // COMPONENTS_VARIATIONS_ACTIVE_FIELD_TRIALS_H_
OLDNEW
« no previous file with comments | « components/user_prefs/user_prefs.h ('k') | components/variations/active_field_trials.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698