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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 127343004: Avoid loading the last used browser profile in app_controller_mac when it's not needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android link error (-> kProfileLastUsed setter is #ifdefed out in profile_manager.cc) Created 6 years, 11 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/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 9ded60f31718bcdc4a23721270a93a0ffdf50d87..af635ca1682069090a73d0c89d04770e23bdf5c1 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -300,26 +300,6 @@ PrefService* InitializeLocalState(
return local_state;
}
-// Returns the path that contains the profile that should be loaded
-// on process startup.
-base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir,
- const CommandLine& command_line) {
- if (command_line.HasSwitch(switches::kProfileDirectory)) {
- return 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 g_browser_process->profile_manager()->GetLastUsedProfileDir(
- user_data_dir);
-}
-
// Initializes the primary profile, possibly doing some user prompting to pick
// a fallback profile. Returns the newly created profile, or NULL if startup
// should not continue.
@@ -341,9 +321,9 @@ Profile* CreatePrimaryProfile(const content::MainFunctionParams& parameters,
}
Profile* profile = NULL;
-#if defined(OS_CHROMEOS)
- // On ChromeOS the ProfileManager will use the same path as the one we got
- // passed. GetActiveUserProfile will therefore use the correct path
+#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
+ // On ChromeOS and Android the ProfileManager will use the same path as the
+ // one we got passed. GetActiveUserProfile will therefore use the correct path
// automatically.
DCHECK_EQ(user_data_dir.value(),
g_browser_process->profile_manager()->user_data_dir().value());
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698