Complete revert of https://codereview.chromium.org/200473002

This reverts changes user_manager_impl.cc that were lost in previous
revert (https://codereview.chromium.org/284333002) because file got moved.

BUG=331530
TBR=antrim

Review URL: https://codereview.chromium.org/288923010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270974 0039d316-1c4b-4281-b951-d872f2087c98
parent f781dc4c
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <set> #include <set>
#include "ash/multi_profile_uma.h" #include "ash/multi_profile_uma.h"
#include "base/base_paths.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
#include "base/command_line.h" #include "base/command_line.h"
...@@ -17,7 +16,6 @@ ...@@ -17,7 +16,6 @@
#include "base/format_macros.h" #include "base/format_macros.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/metrics/histogram.h" #include "base/metrics/histogram.h"
#include "base/path_service.h"
#include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h" #include "base/prefs/pref_service.h"
#include "base/prefs/scoped_user_pref_update.h" #include "base/prefs/scoped_user_pref_update.h"
...@@ -58,7 +56,6 @@ ...@@ -58,7 +56,6 @@
#include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.h" #include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
#include "chrome/common/crash_keys.h" #include "chrome/common/crash_keys.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
...@@ -1553,16 +1550,6 @@ void UserManagerImpl::RetailModeUserLoggedIn() { ...@@ -1553,16 +1550,6 @@ void UserManagerImpl::RetailModeUserLoggedIn() {
void UserManagerImpl::NotifyOnLogin() { void UserManagerImpl::NotifyOnLogin() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// Override user homedir, check for ProfileManager being initialized as
// it may not exist in unit tests.
if (g_browser_process->profile_manager()) {
if (GetLoggedInUsers().size() == 1) {
base::FilePath homedir = ProfileHelper::GetProfilePathByUserIdHash(
primary_user_->username_hash());
PathService::Override(base::DIR_HOME, homedir);
}
}
UpdateNumberOfUsers(); UpdateNumberOfUsers();
NotifyActiveUserHashChanged(active_user_->username_hash()); NotifyActiveUserHashChanged(active_user_->username_hash());
NotifyActiveUserChanged(active_user_); NotifyActiveUserChanged(active_user_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment