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

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

Issue 847733005: Move User Manager onto a System profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
« no previous file with comments | « chrome/browser/profiles/profile_manager.h ('k') | chrome/browser/profiles/profile_manager_unittest.cc » ('j') | 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 adff57b742d4526507207a2efc7a359961ac23e2..5b7484f1ce646c4ee34e4543689ec734e8044464 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -593,6 +593,16 @@ base::FilePath ProfileManager::GetGuestProfilePath() {
return guest_path.Append(chrome::kGuestProfileDir);
}
+// static
+base::FilePath ProfileManager::GetSystemProfilePath() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+
+ ProfileManager* profile_manager = g_browser_process->profile_manager();
+
+ base::FilePath system_path = profile_manager->user_data_dir();
+ return system_path.Append(chrome::kSystemProfileDir);
+}
+
base::FilePath ProfileManager::GenerateNextProfileDirectoryPath() {
PrefService* local_state = g_browser_process->local_state();
DCHECK(local_state);
@@ -1183,7 +1193,7 @@ ProfileManager::ProfileInfo* ProfileManager::GetProfileInfoByPath(
}
void ProfileManager::AddProfileToCache(Profile* profile) {
- if (profile->IsGuestSession())
+ if (profile->IsGuestSession() || profile->IsSystemProfile())
return;
ProfileInfoCache& cache = GetProfileInfoCache();
if (profile->GetPath().DirName() != cache.GetUserDataDir())
« no previous file with comments | « chrome/browser/profiles/profile_manager.h ('k') | chrome/browser/profiles/profile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698