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 <memory> | 10 #include <memory> |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 !profile_launch_observer.Get().HasBeenLaunched(profile); | 865 !profile_launch_observer.Get().HasBeenLaunched(profile); |
866 } | 866 } |
867 | 867 |
868 base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir, | 868 base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir, |
869 const base::CommandLine& command_line) { | 869 const base::CommandLine& command_line) { |
870 if (command_line.HasSwitch(switches::kProfileDirectory)) { | 870 if (command_line.HasSwitch(switches::kProfileDirectory)) { |
871 return user_data_dir.Append( | 871 return user_data_dir.Append( |
872 command_line.GetSwitchValuePath(switches::kProfileDirectory)); | 872 command_line.GetSwitchValuePath(switches::kProfileDirectory)); |
873 } | 873 } |
874 | 874 |
| 875 #if defined(ENABLE_APP_LIST) |
875 // If we are showing the app list then chrome isn't shown so load the app | 876 // If we are showing the app list then chrome isn't shown so load the app |
876 // list's profile rather than chrome's. | 877 // list's profile rather than chrome's. |
877 if (command_line.HasSwitch(switches::kShowAppList)) | 878 if (command_line.HasSwitch(switches::kShowAppList)) |
878 return AppListService::Get()->GetProfilePath(user_data_dir); | 879 return AppListService::Get()->GetProfilePath(user_data_dir); |
| 880 #endif |
879 | 881 |
880 return g_browser_process->profile_manager()->GetLastUsedProfileDir( | 882 return g_browser_process->profile_manager()->GetLastUsedProfileDir( |
881 user_data_dir); | 883 user_data_dir); |
882 } | 884 } |
OLD | NEW |