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

Side by Side Diff: chrome/browser/chromeos/profiles/profile_helper.cc

Issue 23967015: Use multi-profile mount point by default after browser crash and in Guest session. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ProfileManagerTest,InputMethodPersistenceTest Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/profiles/profile_helper.h" 5 #include "chrome/browser/chromeos/profiles/profile_helper.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/browsing_data/browsing_data_helper.h" 10 #include "chrome/browser/browsing_data/browsing_data_helper.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 !UserManager::Get()->IsLoggedInAsStub()) { 111 !UserManager::Get()->IsLoggedInAsStub()) {
112 chromeos::OAuth2LoginManager* login_manager = 112 chromeos::OAuth2LoginManager* login_manager =
113 chromeos::OAuth2LoginManagerFactory::GetInstance()->GetForProfile( 113 chromeos::OAuth2LoginManagerFactory::GetInstance()->GetForProfile(
114 profile); 114 profile);
115 if (login_manager) 115 if (login_manager)
116 login_manager->AddObserver(this); 116 login_manager->AddObserver(this);
117 } 117 }
118 } 118 }
119 119
120 base::FilePath ProfileHelper::GetActiveUserProfileDir() { 120 base::FilePath ProfileHelper::GetActiveUserProfileDir() {
121 DCHECK(!active_user_id_hash_.empty()); 121 return GetUserProfileDir(active_user_id_hash_);
122 return base::FilePath(chrome::kProfileDirPrefix + active_user_id_hash_); 122 }
123
124 base::FilePath ProfileHelper::GetUserProfileDir(
125 const std::string& user_id_hash) {
126 DCHECK(!user_id_hash.empty());
127 return base::FilePath(chrome::kProfileDirPrefix + user_id_hash);
123 } 128 }
124 129
125 void ProfileHelper::Initialize() { 130 void ProfileHelper::Initialize() {
126 UserManager::Get()->AddSessionStateObserver(this); 131 UserManager::Get()->AddSessionStateObserver(this);
127 } 132 }
128 133
129 void ProfileHelper::ClearSigninProfile(const base::Closure& on_clear_callback) { 134 void ProfileHelper::ClearSigninProfile(const base::Closure& on_clear_callback) {
130 on_clear_callbacks_.push_back(on_clear_callback); 135 on_clear_callbacks_.push_back(on_clear_callback);
131 if (signin_profile_clear_requested_) 136 if (signin_profile_clear_requested_)
132 return; 137 return;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 //////////////////////////////////////////////////////////////////////////////// 180 ////////////////////////////////////////////////////////////////////////////////
176 // ProfileHelper, UserManager::UserSessionStateObserver implementation: 181 // ProfileHelper, UserManager::UserSessionStateObserver implementation:
177 182
178 void ProfileHelper::ActiveUserHashChanged(const std::string& hash) { 183 void ProfileHelper::ActiveUserHashChanged(const std::string& hash) {
179 active_user_id_hash_ = hash; 184 active_user_id_hash_ = hash;
180 base::FilePath profile_path = GetProfilePathByUserIdHash(hash); 185 base::FilePath profile_path = GetProfilePathByUserIdHash(hash);
181 LOG(INFO) << "Switching to profile path: " << profile_path.value(); 186 LOG(INFO) << "Switching to profile path: " << profile_path.value();
182 } 187 }
183 188
184 } // namespace chromeos 189 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper.h ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698