| OLD | NEW |
| 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/login/user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/user_manager_impl.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "chrome/browser/chromeos/login/wizard_controller.h" | 34 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 35 #include "chrome/browser/chromeos/session_length_limiter.h" | 35 #include "chrome/browser/chromeos/session_length_limiter.h" |
| 36 #include "chrome/browser/policy/browser_policy_connector.h" | 36 #include "chrome/browser/policy/browser_policy_connector.h" |
| 37 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 37 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 38 #include "chrome/browser/profiles/profile_manager.h" | 38 #include "chrome/browser/profiles/profile_manager.h" |
| 39 #include "chrome/browser/sync/profile_sync_service.h" | 39 #include "chrome/browser/sync/profile_sync_service.h" |
| 40 #include "chrome/browser/sync/profile_sync_service_factory.h" | 40 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 41 #include "chrome/common/chrome_notification_types.h" | 41 #include "chrome/common/chrome_notification_types.h" |
| 42 #include "chrome/common/chrome_switches.h" | 42 #include "chrome/common/chrome_switches.h" |
| 43 #include "chrome/common/pref_names.h" | 43 #include "chrome/common/pref_names.h" |
| 44 #include "chromeos/chromeos_switches.h" | |
| 45 #include "chromeos/cryptohome/async_method_caller.h" | 44 #include "chromeos/cryptohome/async_method_caller.h" |
| 46 #include "content/public/browser/browser_thread.h" | 45 #include "content/public/browser/browser_thread.h" |
| 47 #include "content/public/browser/notification_service.h" | 46 #include "content/public/browser/notification_service.h" |
| 48 #include "google_apis/gaia/gaia_auth_util.h" | 47 #include "google_apis/gaia/gaia_auth_util.h" |
| 49 #include "google_apis/gaia/google_service_auth_error.h" | 48 #include "google_apis/gaia/google_service_auth_error.h" |
| 50 #include "policy/policy_constants.h" | 49 #include "policy/policy_constants.h" |
| 51 | 50 |
| 52 using content::BrowserThread; | 51 using content::BrowserThread; |
| 53 | 52 |
| 54 namespace chromeos { | 53 namespace chromeos { |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 const UserList& UserManagerImpl::GetUsers() const { | 236 const UserList& UserManagerImpl::GetUsers() const { |
| 238 const_cast<UserManagerImpl*>(this)->EnsureUsersLoaded(); | 237 const_cast<UserManagerImpl*>(this)->EnsureUsersLoaded(); |
| 239 return users_; | 238 return users_; |
| 240 } | 239 } |
| 241 | 240 |
| 242 void UserManagerImpl::UserLoggedIn(const std::string& email, | 241 void UserManagerImpl::UserLoggedIn(const std::string& email, |
| 243 const std::string& username_hash, | 242 const std::string& username_hash, |
| 244 bool browser_restart) { | 243 bool browser_restart) { |
| 245 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 244 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 246 | 245 |
| 247 if (!CommandLine::ForCurrentProcess()->HasSwitch(::switches::kMultiProfiles)) | 246 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles)) |
| 248 DCHECK(!IsUserLoggedIn()); | 247 DCHECK(!IsUserLoggedIn()); |
| 249 | 248 |
| 250 if (email == kGuestUserEMail) { | 249 if (email == kGuestUserEMail) { |
| 251 GuestUserLoggedIn(); | 250 GuestUserLoggedIn(); |
| 252 } else if (email == kRetailModeUserEMail) { | 251 } else if (email == kRetailModeUserEMail) { |
| 253 RetailModeUserLoggedIn(); | 252 RetailModeUserLoggedIn(); |
| 254 } else if (gaia::ExtractDomainName(email) == kKioskAppUserDomain) { | 253 } else if (gaia::ExtractDomainName(email) == kKioskAppUserDomain) { |
| 255 KioskAppLoggedIn(email); | 254 KioskAppLoggedIn(email); |
| 256 } else { | 255 } else { |
| 257 EnsureUsersLoaded(); | 256 EnsureUsersLoaded(); |
| (...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 content::NotificationService::NoDetails()); | 1293 content::NotificationService::NoDetails()); |
| 1295 } | 1294 } |
| 1296 | 1295 |
| 1297 void UserManagerImpl::NotifyMergeSessionStateChanged() { | 1296 void UserManagerImpl::NotifyMergeSessionStateChanged() { |
| 1298 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1297 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 1299 FOR_EACH_OBSERVER(UserManager::Observer, observer_list_, | 1298 FOR_EACH_OBSERVER(UserManager::Observer, observer_list_, |
| 1300 MergeSessionStateChanged(merge_session_state_)); | 1299 MergeSessionStateChanged(merge_session_state_)); |
| 1301 } | 1300 } |
| 1302 | 1301 |
| 1303 } // namespace chromeos | 1302 } // namespace chromeos |
| OLD | NEW |