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

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

Issue 14581006: [cros mp] Load profiles from /home/chronos/u-[$hash], add GetUserIdHashFromProfile() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 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
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper_browsertest.cc ('k') | chrome/chrome_tests.gypi » ('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 a1ed001fe17b19e9026519dde70ace801855abf0..dd2c611c2bffbd7b62311a3f285e8df38394e757 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -198,14 +198,6 @@ void CheckCryptohomeIsMounted(chromeos::DBusMethodCallStatus call_status,
LOG(ERROR) << "Cryptohome is not mounted.";
}
-// TODO(nkostylev): Remove this hack when http://crbug.com/224291 is fixed.
-// Now user homedirs are mounted to /home/user which is different from
-// user data dir (/home/chronos).
-base::FilePath GetChromeOSProfileDir(const base::FilePath& path) {
- base::FilePath profile_dir(FILE_PATH_LITERAL("/home/user/"));
- profile_dir = profile_dir.Append(path);
- return profile_dir;
-}
#endif
} // namespace
@@ -349,7 +341,8 @@ base::FilePath ProfileManager::GetInitialProfileDir() {
profile_helper()->active_user_id_hash();
if (command_line.HasSwitch(switches::kMultiProfiles) &&
!user_id_hash.empty()) {
- profile_dir = base::FilePath(user_id_hash);
+ profile_dir = g_browser_process->platform_part()->
+ profile_helper()->GetActiveUserProfileDir();
}
relative_profile_dir = relative_profile_dir.Append(profile_dir);
return relative_profile_dir;
@@ -416,13 +409,7 @@ Profile* ProfileManager::GetDefaultProfile(
#if defined(OS_CHROMEOS)
base::FilePath default_profile_dir(user_data_dir);
if (logged_in_) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles) &&
- base::chromeos::IsRunningOnChromeOS()) {
- // TODO(nkostylev): Change to [user_data_dir]/profile-[hash]
- default_profile_dir = GetChromeOSProfileDir(GetInitialProfileDir());
- } else {
- default_profile_dir = default_profile_dir.Append(GetInitialProfileDir());
- }
+ default_profile_dir = default_profile_dir.Append(GetInitialProfileDir());
} else {
default_profile_dir = GetDefaultProfileDir(user_data_dir);
}
@@ -550,15 +537,6 @@ void ProfileManager::CreateDefaultProfileAsync(const CreateCallback& callback) {
default_profile_dir = default_profile_dir.Append(
profile_manager->GetInitialProfileDir());
-#if defined(OS_CHROMEOS)
- // TODO(nkostylev): Change to [user_data_dir]/profile-[hash]
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles) &&
- base::chromeos::IsRunningOnChromeOS()) {
- default_profile_dir = GetChromeOSProfileDir(
- profile_manager->GetInitialProfileDir());
- }
-#endif
-
// Chrome OS specific note: since we pass string16() here as the icon_url,
// profile cache information will not get updated with the is_managed value
// so we're fine with passing all default values here.
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper_browsertest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698