Roll src/third_party/WebKit 6f84130:7353389 (svn 184386:184391)
[chromium-blink-merge.git] / chrome / common / variations / experiment_labels.h
blob7686d6ff13135d9b972060c4cebc14e6e9448288
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
3 // found in the LICENSE file.
5 #ifndef CHROME_COMMON_VARIATIONS_EXPERIMENT_LABELS_H_
6 #define CHROME_COMMON_VARIATIONS_EXPERIMENT_LABELS_H_
8 #include "base/metrics/field_trial.h"
9 #include "base/strings/string16.h"
11 namespace chrome_variations {
13 // Takes the list of active groups and builds the label for the ones that have
14 // Google Update VariationID associated with them. This will return an empty
15 // string if there are no such groups.
16 base::string16 BuildGoogleUpdateExperimentLabel(
17 const base::FieldTrial::ActiveGroups& active_groups);
19 // Creates a final combined experiment labels string with |variation_labels|
20 // and |other_labels|, appropriately appending a separator based on their
21 // contents. It is assumed that |variation_labels| and |other_labels| do not
22 // have leading or trailing separators.
23 base::string16 CombineExperimentLabels(const base::string16& variation_labels,
24 const base::string16& other_labels);
26 // Takes the value of experiment_labels from the registry and returns a valid
27 // experiment_labels string value containing only the labels that are not
28 // associated with Chrome Variations.
29 base::string16 ExtractNonVariationLabels(const base::string16& labels);
31 } // namespace chrome_variations
33 #endif // CHROME_COMMON_VARIATIONS_EXPERIMENT_LABELS_H_