| 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 <limits> | 10 #include <limits> |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 bool ShowUserManagerOnStartupIfNeeded(Profile* last_used_profile, | 290 bool ShowUserManagerOnStartupIfNeeded(Profile* last_used_profile, |
| 291 const base::CommandLine& command_line) { | 291 const base::CommandLine& command_line) { |
| 292 if (ProfileCanBeAutoOpened(last_used_profile)) | 292 if (ProfileCanBeAutoOpened(last_used_profile)) |
| 293 return false; | 293 return false; |
| 294 | 294 |
| 295 // Show the User Manager. | 295 // Show the User Manager. |
| 296 profiles::UserManagerAction action = | 296 profiles::UserManagerAction action = |
| 297 command_line.HasSwitch(switches::kShowAppList) ? | 297 command_line.HasSwitch(switches::kShowAppList) ? |
| 298 profiles::USER_MANAGER_SELECT_PROFILE_APP_LAUNCHER : | 298 profiles::USER_MANAGER_SELECT_PROFILE_APP_LAUNCHER : |
| 299 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION; | 299 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION; |
| 300 UserManager::Show( | 300 UserManager::Show(base::FilePath(), action); |
| 301 base::FilePath(), profiles::USER_MANAGER_NO_TUTORIAL, action); | |
| 302 return true; | 301 return true; |
| 303 } | 302 } |
| 304 | 303 |
| 305 } // namespace | 304 } // namespace |
| 306 | 305 |
| 307 StartupBrowserCreator::StartupBrowserCreator() | 306 StartupBrowserCreator::StartupBrowserCreator() |
| 308 : is_default_browser_dialog_suppressed_(false), | 307 : is_default_browser_dialog_suppressed_(false), |
| 309 show_main_browser_window_(true) {} | 308 show_main_browser_window_(true) {} |
| 310 | 309 |
| 311 StartupBrowserCreator::~StartupBrowserCreator() {} | 310 StartupBrowserCreator::~StartupBrowserCreator() {} |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 if (!entry->IsSigninRequired()) { | 1017 if (!entry->IsSigninRequired()) { |
| 1019 Profile* profile = profile_manager->GetProfile(entry->GetPath()); | 1018 Profile* profile = profile_manager->GetProfile(entry->GetPath()); |
| 1020 if (profile) | 1019 if (profile) |
| 1021 return profile; | 1020 return profile; |
| 1022 } | 1021 } |
| 1023 } | 1022 } |
| 1024 | 1023 |
| 1025 return nullptr; | 1024 return nullptr; |
| 1026 } | 1025 } |
| 1027 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) | 1026 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
| OLD | NEW |