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

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

Issue 7648037: [Mac] Flip the flag for multi-profiles to on by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Un-needed includes Created 9 years, 4 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/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index a1d792243b5e89c9dd1492ceff3729165a00774c..2e6ddf878aba26e96309d3ffd094efa721f506f9 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -503,7 +503,11 @@ ProfileManager::GetSortedProfilesFromDirectoryMap() {
return profiles;
}
-ProfileInfoCache& ProfileManager::GetProfileInfoCache() {
+ProfileInfoInterface& ProfileManager::GetProfileInfo() {
+ return GetMutableProfileInfo();
+}
+
+ProfileInfoCache& ProfileManager::GetMutableProfileInfo() {
if (!profile_info_cache_.get()) {
FilePath user_data_dir;
PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
@@ -514,7 +518,7 @@ ProfileInfoCache& ProfileManager::GetProfileInfoCache() {
}
void ProfileManager::AddProfileToCache(Profile* profile) {
- ProfileInfoCache& cache = GetProfileInfoCache();
+ ProfileInfoCache& cache = GetMutableProfileInfo();
if (profile->GetPath().DirName() != cache.GetUserDataDir())
return;
@@ -553,13 +557,12 @@ void ProfileManager::ScheduleProfileForDeletion(const FilePath& profile_dir) {
if (profile)
BrowserList::CloseAllBrowsersWithProfile(profile);
profiles_to_delete_.push_back(profile_dir);
- ProfileInfoCache& cache = GetProfileInfoCache();
- cache.DeleteProfileFromCache(profile_dir);
+ GetMutableProfileInfo().DeleteProfileFromCache(profile_dir);
}
// static
bool ProfileManager::IsMultipleProfilesEnabled() {
-#if defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS)
+#if (defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
return true;
#endif
return CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles);

Powered by Google App Engine
This is Rietveld 408576698