OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/browser/chrome_browser_field_trials_desktop.h" | 5 #include "chrome/browser/chrome_browser_field_trials_desktop.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 void DisableShowProfileSwitcherTrialIfNecessary() { | 58 void DisableShowProfileSwitcherTrialIfNecessary() { |
59 // This trial is created by the VariationsService, but it needs to be disabled | 59 // This trial is created by the VariationsService, but it needs to be disabled |
60 // if multi-profiles isn't enabled. | 60 // if multi-profiles isn't enabled. |
61 base::FieldTrial* trial = base::FieldTrialList::Find("ShowProfileSwitcher"); | 61 base::FieldTrial* trial = base::FieldTrialList::Find("ShowProfileSwitcher"); |
62 if (trial && !profiles::IsMultipleProfilesEnabled()) | 62 if (trial && !profiles::IsMultipleProfilesEnabled()) |
63 trial->Disable(); | 63 trial->Disable(); |
64 } | 64 } |
65 | 65 |
66 } // namespace | 66 } // namespace |
67 | 67 |
68 void SetupDesktopFieldTrials(const CommandLine& parsed_command_line, | 68 void SetupDesktopFieldTrials(const base::CommandLine& parsed_command_line, |
69 PrefService* local_state) { | 69 PrefService* local_state) { |
70 prerender::ConfigurePrerender(parsed_command_line); | 70 prerender::ConfigurePrerender(parsed_command_line); |
71 AutoLaunchChromeFieldTrial(); | 71 AutoLaunchChromeFieldTrial(); |
72 SetupInfiniteCacheFieldTrial(); | 72 SetupInfiniteCacheFieldTrial(); |
73 DisableShowProfileSwitcherTrialIfNecessary(); | 73 DisableShowProfileSwitcherTrialIfNecessary(); |
74 SetupShowAppLauncherPromoFieldTrial(local_state); | 74 SetupShowAppLauncherPromoFieldTrial(local_state); |
75 } | 75 } |
76 | 76 |
77 } // namespace chrome | 77 } // namespace chrome |
OLD | NEW |