Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / auto_launch_trial.cc
blobae53d7be1a7e4a14d158683350bee97e70e8ae7e
1 // Copyright (c) 2011 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 #include "chrome/browser/auto_launch_trial.h"
7 #include "base/files/file_path.h"
8 #include "base/metrics/field_trial.h"
9 #include "base/strings/string_util.h"
10 #include "chrome/browser/first_run/first_run.h"
11 #include "chrome/installer/util/master_preferences.h"
12 #include "chrome/installer/util/master_preferences_constants.h"
14 const char kAutoLaunchTrialName[] = "AutoLaunchExperiment";
15 const char kAutoLaunchTrialAutoLaunchGroup[] = "AutoLaunching";
16 const char kAutoLaunchTrialControlGroup[] = "NotAutoLaunching";
18 namespace auto_launch_trial {
20 bool IsInAutoLaunchGroup() {
21 return base::FieldTrialList::TrialExists(kAutoLaunchTrialName) &&
22 base::FieldTrialList::Find(kAutoLaunchTrialName)->group_name()
23 == kAutoLaunchTrialAutoLaunchGroup;
26 bool IsInExperimentGroup(const std::string& brand_code) {
27 return LowerCaseEqualsASCII(brand_code, "rngp");
30 bool IsInControlGroup(const std::string& brand_code) {
31 return LowerCaseEqualsASCII(brand_code, "rngq");
34 } // namespace auto_launch_trial