Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Unified Diff: chrome/browser/ui/startup/startup_browser_creator.cc

Issue 1128173005: Clean up ProfileManager interface. Base URL: https://chromium.googlesource.com/chromium/src@issue479309
Patch Set: sync Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/startup/startup_browser_creator.cc
diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc
index 38cc153f64b02b303c24e3c0c13b89602e550bb3..68939f814e4f7cf79260a0a2b494dfa4e1f7bc50 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator.cc
@@ -840,20 +840,19 @@ bool HasPendingUncleanExit(Profile* profile) {
!profile_launch_observer.Get().HasBeenLaunched(profile);
}
-base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir,
- const base::CommandLine& command_line) {
+base::FilePath GetStartupProfilePath(const base::CommandLine& command_line) {
+ ProfileManager* profile_manager = g_browser_process->profile_manager();
if (command_line.HasSwitch(switches::kProfileDirectory)) {
- return user_data_dir.Append(
+ return profile_manager->user_data_dir().Append(
command_line.GetSwitchValuePath(switches::kProfileDirectory));
}
// If we are showing the app list then chrome isn't shown so load the app
// list's profile rather than chrome's.
if (command_line.HasSwitch(switches::kShowAppList)) {
- return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)->
- GetProfilePath(user_data_dir);
+ return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)
+ ->GetProfilePath();
}
- return g_browser_process->profile_manager()->GetLastUsedProfileDir(
- user_data_dir);
+ return profile_manager->GetLastUsedProfileDir();
}
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator.h ('k') | chrome/browser/ui/views/app_list/win/app_list_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698