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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 #include "chrome/browser/first_run/first_run.h" | 43 #include "chrome/browser/first_run/first_run.h" |
44 #include "chrome/browser/net/predictor.h" | 44 #include "chrome/browser/net/predictor.h" |
45 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 45 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
46 #include "chrome/browser/prefs/session_startup_pref.h" | 46 #include "chrome/browser/prefs/session_startup_pref.h" |
47 #include "chrome/browser/profiles/profile.h" | 47 #include "chrome/browser/profiles/profile.h" |
48 #include "chrome/browser/profiles/profile_attributes_entry.h" | 48 #include "chrome/browser/profiles/profile_attributes_entry.h" |
49 #include "chrome/browser/profiles/profile_attributes_storage.h" | 49 #include "chrome/browser/profiles/profile_attributes_storage.h" |
50 #include "chrome/browser/profiles/profile_manager.h" | 50 #include "chrome/browser/profiles/profile_manager.h" |
51 #include "chrome/browser/profiles/profiles_state.h" | 51 #include "chrome/browser/profiles/profiles_state.h" |
52 #include "chrome/browser/search_engines/template_url_service_factory.h" | 52 #include "chrome/browser/search_engines/template_url_service_factory.h" |
53 #include "chrome/browser/ui/app_list/app_list_service.h" | 53 #include "chrome/browser/ui/app_list/app_list_service.h" |
sky
2016/05/05 17:24:38
Only include if ENABLE_APP_LIST?
tapted
2016/05/06 02:36:56
Done.
| |
54 #include "chrome/browser/ui/browser.h" | 54 #include "chrome/browser/ui/browser.h" |
55 #include "chrome/browser/ui/browser_dialogs.h" | 55 #include "chrome/browser/ui/browser_dialogs.h" |
56 #include "chrome/browser/ui/browser_finder.h" | 56 #include "chrome/browser/ui/browser_finder.h" |
57 #include "chrome/browser/ui/browser_window.h" | 57 #include "chrome/browser/ui/browser_window.h" |
58 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" | 58 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
59 #include "chrome/browser/ui/user_manager.h" | 59 #include "chrome/browser/ui/user_manager.h" |
60 #include "chrome/common/chrome_constants.h" | 60 #include "chrome/common/chrome_constants.h" |
61 #include "chrome/common/chrome_paths.h" | 61 #include "chrome/common/chrome_paths.h" |
62 #include "chrome/common/chrome_result_codes.h" | 62 #include "chrome/common/chrome_result_codes.h" |
63 #include "chrome/common/chrome_switches.h" | 63 #include "chrome/common/chrome_switches.h" |
(...skipping 801 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 |