cc: Drop skip_shared_out_of_order_tiles field from TilingSetEvictionQueue.
[chromium-blink-merge.git] / chrome / browser / chrome_browser_field_trials_desktop.cc
blobb5f2f1f3e7181f67812357b9f7bb5c8fca8df6bd
1 // Copyright 2013 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/chrome_browser_field_trials_desktop.h"
7 #include <string>
9 #include "base/command_line.h"
10 #include "base/metrics/field_trial.h"
11 #include "chrome/browser/auto_launch_trial.h"
12 #include "chrome/browser/google/google_brand.h"
13 #include "chrome/browser/prerender/prerender_field_trial.h"
14 #include "chrome/common/chrome_switches.h"
15 #include "chrome/common/variations/variations_util.h"
16 #include "components/variations/variations_associated_data.h"
18 namespace chrome {
20 namespace {
22 void AutoLaunchChromeFieldTrial() {
23 std::string brand;
24 google_brand::GetBrand(&brand);
26 // Create a 100% field trial based on the brand code.
27 if (auto_launch_trial::IsInExperimentGroup(brand)) {
28 base::FieldTrialList::CreateFieldTrial(kAutoLaunchTrialName,
29 kAutoLaunchTrialAutoLaunchGroup);
30 } else if (auto_launch_trial::IsInControlGroup(brand)) {
31 base::FieldTrialList::CreateFieldTrial(kAutoLaunchTrialName,
32 kAutoLaunchTrialControlGroup);
36 void SetupLightSpeedTrials() {
37 if (!variations::GetVariationParamValue("LightSpeed", "NoGpu").empty()) {
38 base::CommandLine::ForCurrentProcess()->AppendSwitch(
39 switches::kDisableGpu);
43 } // namespace
45 void SetupDesktopFieldTrials(const base::CommandLine& parsed_command_line) {
46 prerender::ConfigurePrerender(parsed_command_line);
47 AutoLaunchChromeFieldTrial();
48 SetupLightSpeedTrials();
51 } // namespace chrome