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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 #if defined(USE_ASH) | 78 #if defined(USE_ASH) |
79 #include "ash/shell.h" | 79 #include "ash/shell.h" |
80 #endif | 80 #endif |
81 | 81 |
82 #if defined(OS_CHROMEOS) | 82 #if defined(OS_CHROMEOS) |
83 #include "chrome/browser/chromeos/app_mode/app_launch_utils.h" | 83 #include "chrome/browser/chromeos/app_mode/app_launch_utils.h" |
84 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" | 84 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" |
85 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 85 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
86 #include "chrome/browser/lifetime/application_lifetime.h" | 86 #include "chrome/browser/lifetime/application_lifetime.h" |
87 #include "chromeos/chromeos_switches.h" | 87 #include "chromeos/chromeos_switches.h" |
| 88 #include "chromeos/cryptohome/cryptohome_parameters.h" |
| 89 #include "chromeos/login/auth/utils.h" |
88 #include "components/user_manager/user_manager.h" | 90 #include "components/user_manager/user_manager.h" |
89 #endif | 91 #endif |
90 | 92 |
91 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) | 93 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) |
92 #include "ui/events/devices/x11/touch_factory_x11.h" | 94 #include "ui/events/devices/x11/touch_factory_x11.h" |
93 #endif | 95 #endif |
94 | 96 |
95 #if defined(OS_MACOSX) | 97 #if defined(OS_MACOSX) |
96 #include "chrome/browser/web_applications/web_app_mac.h" | 98 #include "chrome/browser/web_applications/web_app_mac.h" |
97 #endif | 99 #endif |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 command_line.GetSwitchValueASCII(switches::kAppId)); | 668 command_line.GetSwitchValueASCII(switches::kAppId)); |
667 | 669 |
668 // Skip browser launch since app mode launches its app window. | 670 // Skip browser launch since app mode launches its app window. |
669 silent_launch = true; | 671 silent_launch = true; |
670 } | 672 } |
671 | 673 |
672 // If we are a demo app session and we crashed, there is no safe recovery | 674 // 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, | 675 // possible. We should instead cleanly exit and go back to the OOBE screen, |
674 // where we will launch again after the timeout has expired. | 676 // where we will launch again after the timeout has expired. |
675 if (chromeos::DemoAppLauncher::IsDemoAppSession( | 677 if (chromeos::DemoAppLauncher::IsDemoAppSession( |
676 command_line.GetSwitchValueASCII(chromeos::switches::kLoginUser))) { | 678 cryptohome::GetAccountId(cryptohome::Identification::FromString( |
| 679 command_line.GetSwitchValueASCII( |
| 680 chromeos::switches::kLoginUser))))) { |
677 chrome::AttemptUserExit(); | 681 chrome::AttemptUserExit(); |
678 return false; | 682 return false; |
679 } | 683 } |
680 #endif // OS_CHROMEOS | 684 #endif // OS_CHROMEOS |
681 | 685 |
682 #if defined(TOOLKIT_VIEWS) && defined(USE_X11) | 686 #if defined(TOOLKIT_VIEWS) && defined(USE_X11) |
683 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); | 687 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); |
684 #endif | 688 #endif |
685 | 689 |
686 #if defined(OS_MACOSX) | 690 #if defined(OS_MACOSX) |
(...skipping 244 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 | 935 // If we are showing the app list then chrome isn't shown so load the app |
932 // list's profile rather than chrome's. | 936 // list's profile rather than chrome's. |
933 if (command_line.HasSwitch(switches::kShowAppList)) { | 937 if (command_line.HasSwitch(switches::kShowAppList)) { |
934 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)-> | 938 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)-> |
935 GetProfilePath(user_data_dir); | 939 GetProfilePath(user_data_dir); |
936 } | 940 } |
937 | 941 |
938 return g_browser_process->profile_manager()->GetLastUsedProfileDir( | 942 return g_browser_process->profile_manager()->GetLastUsedProfileDir( |
939 user_data_dir); | 943 user_data_dir); |
940 } | 944 } |
OLD | NEW |