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

Side by Side Diff: chrome/browser/chrome_browser_field_trials_desktop.cc

Issue 271533004: Turning on MultiProfile by default for ChromeOS (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 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/environment.h" 10 #include "base/environment.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/ui/sync/one_click_signin_helper.h" 21 #include "chrome/browser/ui/sync/one_click_signin_helper.h"
22 #include "chrome/common/chrome_constants.h" 22 #include "chrome/common/chrome_constants.h"
23 #include "chrome/common/chrome_switches.h" 23 #include "chrome/common/chrome_switches.h"
24 #include "chrome/common/chrome_version_info.h" 24 #include "chrome/common/chrome_version_info.h"
25 #include "chrome/common/metrics/variations/variations_util.h" 25 #include "chrome/common/metrics/variations/variations_util.h"
26 #include "chrome/common/pref_names.h" 26 #include "chrome/common/pref_names.h"
27 #include "content/public/common/content_constants.h" 27 #include "content/public/common/content_constants.h"
28 #include "net/spdy/spdy_session.h" 28 #include "net/spdy/spdy_session.h"
29 #include "ui/base/layout.h" 29 #include "ui/base/layout.h"
30 30
31 #if defined(OS_CHROMEOS)
32 #include "chrome/browser/chromeos/login/user_manager.h"
33 #endif
34
35 namespace chrome { 31 namespace chrome {
36 32
37 namespace { 33 namespace {
38 34
39 void AutoLaunchChromeFieldTrial() { 35 void AutoLaunchChromeFieldTrial() {
40 std::string brand; 36 std::string brand;
41 google_util::GetBrand(&brand); 37 google_util::GetBrand(&brand);
42 38
43 // Create a 100% field trial based on the brand code. 39 // Create a 100% field trial based on the brand code.
44 if (auto_launch_trial::IsInExperimentGroup(brand)) { 40 if (auto_launch_trial::IsInExperimentGroup(brand)) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 trial->AppendGroup("20-pct", group == "20-pct" ? 100 : 0); 104 trial->AppendGroup("20-pct", group == "20-pct" ? 100 : 0);
109 trial->AppendGroup("15-pct", group == "15-pct" ? 100 : 0); 105 trial->AppendGroup("15-pct", group == "15-pct" ? 100 : 0);
110 trial->AppendGroup("10-pct", group == "10-pct" ? 100 : 0); 106 trial->AppendGroup("10-pct", group == "10-pct" ? 100 : 0);
111 trial->AppendGroup("5-pct", group == "5-pct" ? 100 : 0); 107 trial->AppendGroup("5-pct", group == "5-pct" ? 100 : 0);
112 trial->AppendGroup("0-pct", group == "0-pct" ? 100 : 0); 108 trial->AppendGroup("0-pct", group == "0-pct" ? 100 : 0);
113 109
114 // We have to call group in order to mark the experiment as active. 110 // We have to call group in order to mark the experiment as active.
115 trial->group(); 111 trial->group();
116 } 112 }
117 113
118 #if defined(OS_CHROMEOS)
119 void SetupChromeOSMultiProfilesAllowedTrial() {
120 const char kTrialName[] = "ChromeOSMultiProfilesAllowed";
121 if (chromeos::UserManager::IsMultipleProfilesAllowed())
122 base::FieldTrialList::CreateFieldTrial(kTrialName, "allowed")->group();
123 else
124 base::FieldTrialList::CreateFieldTrial(kTrialName, "not_allowed")->group();
125 }
126 #endif // defined(OS_CHROMEOS)
127
128 } // namespace 114 } // namespace
129 115
130 void SetupDesktopFieldTrials(const CommandLine& parsed_command_line, 116 void SetupDesktopFieldTrials(const CommandLine& parsed_command_line,
131 const base::Time& install_time, 117 const base::Time& install_time,
132 PrefService* local_state) { 118 PrefService* local_state) {
133 prerender::ConfigurePrerender(parsed_command_line); 119 prerender::ConfigurePrerender(parsed_command_line);
134 AutoLaunchChromeFieldTrial(); 120 AutoLaunchChromeFieldTrial();
135 OmniboxFieldTrial::ActivateStaticTrials(); 121 OmniboxFieldTrial::ActivateStaticTrials();
136 SetupInfiniteCacheFieldTrial(); 122 SetupInfiniteCacheFieldTrial();
137 DisableShowProfileSwitcherTrialIfNecessary(); 123 DisableShowProfileSwitcherTrialIfNecessary();
138 SetupShowAppLauncherPromoFieldTrial(local_state); 124 SetupShowAppLauncherPromoFieldTrial(local_state);
139 SetupPreReadFieldTrial(); 125 SetupPreReadFieldTrial();
140 #if defined(OS_CHROMEOS)
141 SetupChromeOSMultiProfilesAllowedTrial();
142 #endif
143 } 126 }
144 127
145 } // namespace chrome 128 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698