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

Side by Side Diff: chrome/common/metrics/variations/variations_util.h

Issue 286063004: Move active field trial API to variations component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_COMMON_METRICS_VARIATIONS_VARIATIONS_UTIL_H_ 5 #ifndef CHROME_COMMON_METRICS_VARIATIONS_VARIATIONS_UTIL_H_
6 #define CHROME_COMMON_METRICS_VARIATIONS_VARIATIONS_UTIL_H_ 6 #define CHROME_COMMON_METRICS_VARIATIONS_VARIATIONS_UTIL_H_
7 7
8 #include <string>
9 #include <vector>
10
11 #include "base/metrics/field_trial.h"
12 #include "base/strings/string16.h"
13 #include "components/variations/variations_associated_data.h"
14
15 namespace chrome_variations { 8 namespace chrome_variations {
16 9
17 // Fills the supplied vector |name_group_ids| (which must be empty when called)
18 // with unique ActiveGroupIds for each Field Trial that has a chosen group.
19 // Field Trials for which a group has not been chosen yet are NOT returned in
20 // this list.
21 void GetFieldTrialActiveGroupIds(std::vector<ActiveGroupId>* name_group_ids);
22
23 // Fills the supplied vector |output| (which must be empty when called) with
24 // unique string representations of ActiveGroupIds for each Field Trial that
25 // has a chosen group. The strings are formatted as "<TrialName>-<GroupName>",
26 // with the names as hex strings. Field Trials for which a group has not been
27 // chosen yet are NOT returned in this list.
28 void GetFieldTrialActiveGroupIdsAsStrings(std::vector<std::string>* output);
29
30 // Get the current set of chosen FieldTrial groups (aka variations) and send 10 // Get the current set of chosen FieldTrial groups (aka variations) and send
31 // them to the child process logging module so it can save it for crash dumps. 11 // them to the child process logging module so it can save it for crash dumps.
32 void SetChildProcessLoggingVariationList(); 12 void SetChildProcessLoggingVariationList();
33 13
34 // Expose some functions for testing. These functions just wrap functionality
35 // that is implemented above.
36 namespace testing {
37
38 // Clears all of the mapped associations.
39 void ClearAllVariationIDs();
40
41 void TestGetFieldTrialActiveGroupIds(
42 const base::FieldTrial::ActiveGroups& active_groups,
43 std::vector<ActiveGroupId>* name_group_ids);
44
45 } // namespace testing
46
47 } // namespace chrome_variations 14 } // namespace chrome_variations
48 15
49 #endif // CHROME_COMMON_METRICS_VARIATIONS_VARIATIONS_UTIL_H_ 16 #endif // CHROME_COMMON_METRICS_VARIATIONS_VARIATIONS_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/common/metrics/variations/uniformity_field_trials.cc ('k') | chrome/common/metrics/variations/variations_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698