OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/login/session/user_session_manager.h" | 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 } | 316 } |
317 | 317 |
318 void UserSessionStateObserver::PendingUserSessionsRestoreFinished() { | 318 void UserSessionStateObserver::PendingUserSessionsRestoreFinished() { |
319 } | 319 } |
320 | 320 |
321 UserSessionStateObserver::~UserSessionStateObserver() { | 321 UserSessionStateObserver::~UserSessionStateObserver() { |
322 } | 322 } |
323 | 323 |
324 // static | 324 // static |
325 UserSessionManager* UserSessionManager::GetInstance() { | 325 UserSessionManager* UserSessionManager::GetInstance() { |
326 return Singleton<UserSessionManager, | 326 return base::Singleton<UserSessionManager, base::DefaultSingletonTraits< |
327 DefaultSingletonTraits<UserSessionManager> >::get(); | 327 UserSessionManager>>::get(); |
328 } | 328 } |
329 | 329 |
330 // static | 330 // static |
331 void UserSessionManager::OverrideHomedir() { | 331 void UserSessionManager::OverrideHomedir() { |
332 // Override user homedir, check for ProfileManager being initialized as | 332 // Override user homedir, check for ProfileManager being initialized as |
333 // it may not exist in unit tests. | 333 // it may not exist in unit tests. |
334 if (g_browser_process->profile_manager()) { | 334 if (g_browser_process->profile_manager()) { |
335 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); | 335 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); |
336 if (user_manager->GetLoggedInUsers().size() == 1) { | 336 if (user_manager->GetLoggedInUsers().size() == 1) { |
337 base::FilePath homedir = ProfileHelper::GetProfilePathByUserIdHash( | 337 base::FilePath homedir = ProfileHelper::GetProfilePathByUserIdHash( |
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1756 token_handle_util_.reset(); | 1756 token_handle_util_.reset(); |
1757 } | 1757 } |
1758 | 1758 |
1759 void UserSessionManager::CreateTokenUtilIfMissing() { | 1759 void UserSessionManager::CreateTokenUtilIfMissing() { |
1760 if (!token_handle_util_.get()) | 1760 if (!token_handle_util_.get()) |
1761 token_handle_util_.reset( | 1761 token_handle_util_.reset( |
1762 new TokenHandleUtil(user_manager::UserManager::Get())); | 1762 new TokenHandleUtil(user_manager::UserManager::Get())); |
1763 } | 1763 } |
1764 | 1764 |
1765 } // namespace chromeos | 1765 } // namespace chromeos |
OLD | NEW |