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

Side by Side Diff: chrome/browser/chromeos/login/user_manager_impl.cc

Issue 13671005: Re-apply 192420: Move login switches to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/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
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"
44 #include "chromeos/cryptohome/async_method_caller.h" 45 #include "chromeos/cryptohome/async_method_caller.h"
45 #include "content/public/browser/browser_thread.h" 46 #include "content/public/browser/browser_thread.h"
46 #include "content/public/browser/notification_service.h" 47 #include "content/public/browser/notification_service.h"
47 #include "google_apis/gaia/gaia_auth_util.h" 48 #include "google_apis/gaia/gaia_auth_util.h"
48 #include "google_apis/gaia/google_service_auth_error.h" 49 #include "google_apis/gaia/google_service_auth_error.h"
49 #include "policy/policy_constants.h" 50 #include "policy/policy_constants.h"
50 51
51 using content::BrowserThread; 52 using content::BrowserThread;
52 53
53 namespace chromeos { 54 namespace chromeos {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 const UserList& UserManagerImpl::GetUsers() const { 237 const UserList& UserManagerImpl::GetUsers() const {
237 const_cast<UserManagerImpl*>(this)->EnsureUsersLoaded(); 238 const_cast<UserManagerImpl*>(this)->EnsureUsersLoaded();
238 return users_; 239 return users_;
239 } 240 }
240 241
241 void UserManagerImpl::UserLoggedIn(const std::string& email, 242 void UserManagerImpl::UserLoggedIn(const std::string& email,
242 const std::string& username_hash, 243 const std::string& username_hash,
243 bool browser_restart) { 244 bool browser_restart) {
244 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 245 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
245 246
246 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles)) 247 if (!CommandLine::ForCurrentProcess()->HasSwitch(::switches::kMultiProfiles))
247 DCHECK(!IsUserLoggedIn()); 248 DCHECK(!IsUserLoggedIn());
248 249
249 if (email == kGuestUserEMail) { 250 if (email == kGuestUserEMail) {
250 GuestUserLoggedIn(); 251 GuestUserLoggedIn();
251 } else if (email == kRetailModeUserEMail) { 252 } else if (email == kRetailModeUserEMail) {
252 RetailModeUserLoggedIn(); 253 RetailModeUserLoggedIn();
253 } else if (gaia::ExtractDomainName(email) == kKioskAppUserDomain) { 254 } else if (gaia::ExtractDomainName(email) == kKioskAppUserDomain) {
254 KioskAppLoggedIn(email); 255 KioskAppLoggedIn(email);
255 } else { 256 } else {
256 EnsureUsersLoaded(); 257 EnsureUsersLoaded();
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 content::NotificationService::NoDetails()); 1294 content::NotificationService::NoDetails());
1294 } 1295 }
1295 1296
1296 void UserManagerImpl::NotifyMergeSessionStateChanged() { 1297 void UserManagerImpl::NotifyMergeSessionStateChanged() {
1297 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1298 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1298 FOR_EACH_OBSERVER(UserManager::Observer, observer_list_, 1299 FOR_EACH_OBSERVER(UserManager::Observer, observer_list_,
1299 MergeSessionStateChanged(merge_session_state_)); 1300 MergeSessionStateChanged(merge_session_state_));
1300 } 1301 }
1301 1302
1302 } // namespace chromeos 1303 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698