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

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 16105005: Cleanup legacy flags and switches (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more Created 7 years, 6 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/chromeos/login/login_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/chromeos/chrome_browser_main_chromeos.h" 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 return !command_line.HasSwitch(switches::kDisableAppMode) && 215 return !command_line.HasSwitch(switches::kDisableAppMode) &&
216 command_line.HasSwitch(switches::kLoginManager) && 216 command_line.HasSwitch(switches::kLoginManager) &&
217 !command_line.HasSwitch(switches::kForceLoginManagerInTests) && 217 !command_line.HasSwitch(switches::kForceLoginManagerInTests) &&
218 !app_manager->GetAutoLaunchApp().empty() && 218 !app_manager->GetAutoLaunchApp().empty() &&
219 KioskAppLaunchError::Get() == KioskAppLaunchError::NONE; 219 KioskAppLaunchError::Get() == KioskAppLaunchError::NONE;
220 } 220 }
221 221
222 void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line, 222 void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line,
223 Profile* profile) { 223 Profile* profile) {
224 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { 224 if (parsed_command_line.HasSwitch(switches::kLoginManager)) {
225 std::string first_screen = 225 ShowLoginWizard(std::string());
226 parsed_command_line.GetSwitchValueASCII(switches::kLoginScreen);
227 std::string size_arg =
228 parsed_command_line.GetSwitchValueASCII(switches::kLoginScreenSize);
229 gfx::Size size(0, 0);
230 // Allow the size of the login window to be set explicitly. If not set,
231 // default to the entire screen. This is mostly useful for testing.
232 if (size_arg.size()) {
233 std::vector<std::string> dimensions;
234 base::SplitString(size_arg, ',', &dimensions);
235 if (dimensions.size() == 2) {
236 int width, height;
237 if (base::StringToInt(dimensions[0], &width) &&
238 base::StringToInt(dimensions[1], &height))
239 size.SetSize(width, height);
240 }
241 }
242
243 ShowLoginWizard(first_screen, size);
244 226
245 if (KioskModeSettings::Get()->IsKioskModeEnabled()) 227 if (KioskModeSettings::Get()->IsKioskModeEnabled())
246 InitializeKioskModeScreensaver(); 228 InitializeKioskModeScreensaver();
247 229
248 // If app mode is enabled, reset reboot after update flag when login 230 // If app mode is enabled, reset reboot after update flag when login
249 // screen is shown. 231 // screen is shown.
250 if (!parsed_command_line.HasSwitch(switches::kDisableAppMode)) { 232 if (!parsed_command_line.HasSwitch(switches::kDisableAppMode)) {
251 if (!g_browser_process->browser_policy_connector()-> 233 if (!g_browser_process->browser_policy_connector()->
252 IsEnterpriseManaged()) { 234 IsEnterpriseManaged()) {
253 PrefService* local_state = g_browser_process->local_state(); 235 PrefService* local_state = g_browser_process->local_state();
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); 909 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0);
928 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); 910 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0);
929 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); 911 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0);
930 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); 912 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0);
931 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); 913 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0);
932 // This is necessary to start the experiment as a side effect. 914 // This is necessary to start the experiment as a side effect.
933 trial->group(); 915 trial->group();
934 } 916 }
935 917
936 } // namespace chromeos 918 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/chromeos/login/login_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698