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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 1051843002: Use last active profile instead of default profile in profile manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moves the logic to ProfileManager::GetActiveUserProfile for windows Created 5 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 4972c7c4d2290f1258182e63f50ac3e0b6f14ffd..2e98ee413510fb3fda9d367005b1e23427fd0cf3 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -356,6 +356,7 @@ Profile* ProfileManager::GetActiveUserProfile() {
return chromeos::ProfileHelper::Get()->GetProfileByUserUnsafe(user);
#endif
+#if !defined(OS_WIN)
Profile* profile =
profile_manager->GetActiveUserOrOffTheRecordProfileFromPath(
profile_manager->user_data_dir());
@@ -366,6 +367,10 @@ Profile* ProfileManager::GetActiveUserProfile() {
// figure out how common this is. http://crbug.com/383019
CHECK(profile) << profile_manager->user_data_dir().AsUTF8Unsafe();
return profile;
+#else
+ return profile_manager->GetProfile(
+ profile_manager->GetLastUsedProfileDir(profile_manager->user_data_dir()));
+#endif
}
Profile* ProfileManager::GetProfile(const base::FilePath& profile_dir) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698