OLD | NEW |
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 delete this; | 202 delete this; |
203 } | 203 } |
204 | 204 |
205 scoped_refptr<Authenticator> authenticator_; | 205 scoped_refptr<Authenticator> authenticator_; |
206 bool pending_requests_; | 206 bool pending_requests_; |
207 bool profile_prepared_; | 207 bool profile_prepared_; |
208 }; | 208 }; |
209 | 209 |
210 bool ShouldAutoLaunchKioskApp(const CommandLine& command_line) { | 210 bool ShouldAutoLaunchKioskApp(const CommandLine& command_line) { |
211 KioskAppManager* app_manager = KioskAppManager::Get(); | 211 KioskAppManager* app_manager = KioskAppManager::Get(); |
212 return !command_line.HasSwitch(::switches::kDisableAppMode) && | 212 return !command_line.HasSwitch(switches::kDisableAppMode) && |
213 command_line.HasSwitch(switches::kLoginManager) && | 213 command_line.HasSwitch(switches::kLoginManager) && |
214 !command_line.HasSwitch(switches::kForceLoginManagerInTests) && | 214 !command_line.HasSwitch(switches::kForceLoginManagerInTests) && |
215 !app_manager->GetAutoLaunchApp().empty() && | 215 !app_manager->GetAutoLaunchApp().empty() && |
216 KioskAppLaunchError::Get() == KioskAppLaunchError::NONE; | 216 KioskAppLaunchError::Get() == KioskAppLaunchError::NONE; |
217 } | 217 } |
218 | 218 |
219 void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line, | 219 void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line, |
220 Profile* profile) { | 220 Profile* profile) { |
221 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { | 221 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { |
222 std::string first_screen = | 222 std::string first_screen = |
(...skipping 14 matching lines...) Expand all Loading... |
237 } | 237 } |
238 } | 238 } |
239 | 239 |
240 ShowLoginWizard(first_screen, size); | 240 ShowLoginWizard(first_screen, size); |
241 | 241 |
242 if (KioskModeSettings::Get()->IsKioskModeEnabled()) | 242 if (KioskModeSettings::Get()->IsKioskModeEnabled()) |
243 InitializeKioskModeScreensaver(); | 243 InitializeKioskModeScreensaver(); |
244 | 244 |
245 // If app mode is enabled, reset reboot after update flag when login | 245 // If app mode is enabled, reset reboot after update flag when login |
246 // screen is shown. | 246 // screen is shown. |
247 if (!parsed_command_line.HasSwitch(::switches::kDisableAppMode)) { | 247 if (!parsed_command_line.HasSwitch(switches::kDisableAppMode)) { |
248 if (!g_browser_process->browser_policy_connector()-> | 248 if (!g_browser_process->browser_policy_connector()-> |
249 IsEnterpriseManaged()) { | 249 IsEnterpriseManaged()) { |
250 PrefService* local_state = g_browser_process->local_state(); | 250 PrefService* local_state = g_browser_process->local_state(); |
251 local_state->ClearPref(prefs::kRebootAfterUpdate); | 251 local_state->ClearPref(prefs::kRebootAfterUpdate); |
252 } | 252 } |
253 } | 253 } |
254 } else if (parsed_command_line.HasSwitch(switches::kLoginUser) && | 254 } else if (parsed_command_line.HasSwitch(switches::kLoginUser) && |
255 parsed_command_line.HasSwitch(switches::kLoginPassword)) { | 255 parsed_command_line.HasSwitch(switches::kLoginPassword)) { |
256 BootTimesLoader::Get()->RecordLoginAttempted(); | 256 BootTimesLoader::Get()->RecordLoginAttempted(); |
257 new StubLogin( | 257 new StubLogin( |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); | 905 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); |
906 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); | 906 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); |
907 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); | 907 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); |
908 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); | 908 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); |
909 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); | 909 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); |
910 // This is necessary to start the experiment as a side effect. | 910 // This is necessary to start the experiment as a side effect. |
911 trial->group(); | 911 trial->group(); |
912 } | 912 } |
913 | 913 |
914 } // namespace chromeos | 914 } // namespace chromeos |
OLD | NEW |