| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/startup/startup_browser_creator.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> // For max(). | 9 #include <algorithm> // For max(). |
| 10 #include <set> | 10 #include <set> |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 last_used_profile, | 665 last_used_profile, |
| 666 command_line.GetSwitchValueASCII(switches::kAppId)); | 666 command_line.GetSwitchValueASCII(switches::kAppId)); |
| 667 | 667 |
| 668 // Skip browser launch since app mode launches its app window. | 668 // Skip browser launch since app mode launches its app window. |
| 669 silent_launch = true; | 669 silent_launch = true; |
| 670 } | 670 } |
| 671 | 671 |
| 672 // If we are a demo app session and we crashed, there is no safe recovery | 672 // If we are a demo app session and we crashed, there is no safe recovery |
| 673 // possible. We should instead cleanly exit and go back to the OOBE screen, | 673 // possible. We should instead cleanly exit and go back to the OOBE screen, |
| 674 // where we will launch again after the timeout has expired. | 674 // where we will launch again after the timeout has expired. |
| 675 // |
| 676 // TODO (alemate): kLoginUser value is no longer user e-mail. Make this check |
| 677 // more correct. |
| 675 if (chromeos::DemoAppLauncher::IsDemoAppSession( | 678 if (chromeos::DemoAppLauncher::IsDemoAppSession( |
| 676 command_line.GetSwitchValueASCII(chromeos::switches::kLoginUser))) { | 679 command_line.GetSwitchValueASCII(chromeos::switches::kLoginUser))) { |
| 677 chrome::AttemptUserExit(); | 680 chrome::AttemptUserExit(); |
| 678 return false; | 681 return false; |
| 679 } | 682 } |
| 680 #endif // OS_CHROMEOS | 683 #endif // OS_CHROMEOS |
| 681 | 684 |
| 682 #if defined(TOOLKIT_VIEWS) && defined(USE_X11) | 685 #if defined(TOOLKIT_VIEWS) && defined(USE_X11) |
| 683 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); | 686 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); |
| 684 #endif | 687 #endif |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 // If we are showing the app list then chrome isn't shown so load the app | 934 // If we are showing the app list then chrome isn't shown so load the app |
| 932 // list's profile rather than chrome's. | 935 // list's profile rather than chrome's. |
| 933 if (command_line.HasSwitch(switches::kShowAppList)) { | 936 if (command_line.HasSwitch(switches::kShowAppList)) { |
| 934 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)-> | 937 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)-> |
| 935 GetProfilePath(user_data_dir); | 938 GetProfilePath(user_data_dir); |
| 936 } | 939 } |
| 937 | 940 |
| 938 return g_browser_process->profile_manager()->GetLastUsedProfileDir( | 941 return g_browser_process->profile_manager()->GetLastUsedProfileDir( |
| 939 user_data_dir); | 942 user_data_dir); |
| 940 } | 943 } |
| OLD | NEW |