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

Unified Diff: chrome/browser/chromeos/login/user_manager_impl.cc

Issue 200473002: Move all callers of GetHomeDir() to PathService::Get(base::DIR_HOME). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 9 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
« base/file_util.h ('K') | « base/file_util_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user_manager_impl.cc
diff --git a/chrome/browser/chromeos/login/user_manager_impl.cc b/chrome/browser/chromeos/login/user_manager_impl.cc
index 1e0c61a99c7b6f86d073c225b2b659bec3a8ab06..53d12befea07b6b245aefd6587a4892c59110e16 100644
--- a/chrome/browser/chromeos/login/user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/user_manager_impl.cc
@@ -1504,12 +1504,19 @@ void UserManagerImpl::RetailModeUserLoggedIn() {
}
void UserManagerImpl::NotifyOnLogin() {
- UpdateNumberOfUsers();
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+
+ // Notify that use of base::GetHomeDir() is now allowed and initialize
+ // it to primary user home dir.
+ base::SetUserLoggedIn(true);
+ if (GetLoggedInUsers().size() == 1)
+ base::SetPrimaryUserIdHash(active_user_->username_hash());
+
+ UpdateNumberOfUsers();
NotifyActiveUserHashChanged(active_user_->username_hash());
NotifyActiveUserChanged(active_user_);
-
UpdateLoginState();
+
// TODO(nkostylev): Deprecate this notification in favor of
// ActiveUserChanged() observer call.
content::NotificationService::current()->Notify(
« base/file_util.h ('K') | « base/file_util_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698