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

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

Issue 254263004: Revert of Removed dependency on the UI from the NetworkPortalDetector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 9
10 #include "ash/multi_profile_uma.h" 10 #include "ash/multi_profile_uma.h"
(...skipping 22 matching lines...) Expand all
33 #include "chrome/browser/chromeos/login/auth_sync_observer.h" 33 #include "chrome/browser/chromeos/login/auth_sync_observer.h"
34 #include "chrome/browser/chromeos/login/auth_sync_observer_factory.h" 34 #include "chrome/browser/chromeos/login/auth_sync_observer_factory.h"
35 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" 35 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
36 #include "chrome/browser/chromeos/login/login_display.h" 36 #include "chrome/browser/chromeos/login/login_display.h"
37 #include "chrome/browser/chromeos/login/login_utils.h" 37 #include "chrome/browser/chromeos/login/login_utils.h"
38 #include "chrome/browser/chromeos/login/multi_profile_user_controller.h" 38 #include "chrome/browser/chromeos/login/multi_profile_user_controller.h"
39 #include "chrome/browser/chromeos/login/remove_user_delegate.h" 39 #include "chrome/browser/chromeos/login/remove_user_delegate.h"
40 #include "chrome/browser/chromeos/login/supervised_user_manager_impl.h" 40 #include "chrome/browser/chromeos/login/supervised_user_manager_impl.h"
41 #include "chrome/browser/chromeos/login/user_image_manager_impl.h" 41 #include "chrome/browser/chromeos/login/user_image_manager_impl.h"
42 #include "chrome/browser/chromeos/login/wizard_controller.h" 42 #include "chrome/browser/chromeos/login/wizard_controller.h"
43 #include "chrome/browser/chromeos/net/network_portal_detector.h"
44 #include "chrome/browser/chromeos/net/network_portal_detector_strategy.h"
45 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 43 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
46 #include "chrome/browser/chromeos/policy/device_local_account.h" 44 #include "chrome/browser/chromeos/policy/device_local_account.h"
47 #include "chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog. h" 45 #include "chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog. h"
48 #include "chrome/browser/chromeos/profiles/profile_helper.h" 46 #include "chrome/browser/chromeos/profiles/profile_helper.h"
49 #include "chrome/browser/chromeos/session_length_limiter.h" 47 #include "chrome/browser/chromeos/session_length_limiter.h"
50 #include "chrome/browser/managed_mode/chromeos/managed_user_password_service_fac tory.h" 48 #include "chrome/browser/managed_mode/chromeos/managed_user_password_service_fac tory.h"
51 #include "chrome/browser/managed_mode/chromeos/manager_password_service_factory. h" 49 #include "chrome/browser/managed_mode/chromeos/manager_password_service_factory. h"
52 #include "chrome/browser/net/nss_context.h" 50 #include "chrome/browser/net/nss_context.h"
53 #include "chrome/browser/profiles/profile.h" 51 #include "chrome/browser/profiles/profile.h"
54 #include "chrome/browser/profiles/profile_manager.h" 52 #include "chrome/browser/profiles/profile_manager.h"
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 chrome::NOTIFICATION_LOGIN_USER_CHANGED, 1563 chrome::NOTIFICATION_LOGIN_USER_CHANGED,
1566 content::Source<UserManager>(this), 1564 content::Source<UserManager>(this),
1567 content::Details<const User>(active_user_)); 1565 content::Details<const User>(active_user_));
1568 1566
1569 // Owner must be first user in session. DeviceSettingsService can't deal with 1567 // Owner must be first user in session. DeviceSettingsService can't deal with
1570 // multiple user and will mix up ownership, crbug.com/230018. 1568 // multiple user and will mix up ownership, crbug.com/230018.
1571 if (GetLoggedInUsers().size() == 1) { 1569 if (GetLoggedInUsers().size() == 1) {
1572 // Indicate to DeviceSettingsService that the owner key may have become 1570 // Indicate to DeviceSettingsService that the owner key may have become
1573 // available. 1571 // available.
1574 DeviceSettingsService::Get()->SetUsername(active_user_->email()); 1572 DeviceSettingsService::Get()->SetUsername(active_user_->email());
1575
1576 if (NetworkPortalDetector::IsInitialized()) {
1577 NetworkPortalDetector::Get()->SetStrategy(
1578 PortalDetectorStrategy::STRATEGY_ID_SESSION);
1579 }
1580 } 1573 }
1581 } 1574 }
1582 1575
1583 User::OAuthTokenStatus UserManagerImpl::LoadUserOAuthStatus( 1576 User::OAuthTokenStatus UserManagerImpl::LoadUserOAuthStatus(
1584 const std::string& user_id) const { 1577 const std::string& user_id) const {
1585 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1578 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1586 1579
1587 PrefService* local_state = g_browser_process->local_state(); 1580 PrefService* local_state = g_browser_process->local_state();
1588 const base::DictionaryValue* prefs_oauth_status = 1581 const base::DictionaryValue* prefs_oauth_status =
1589 local_state->GetDictionary(kUserOAuthTokenStatus); 1582 local_state->GetDictionary(kUserOAuthTokenStatus);
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
2103 } 2096 }
2104 2097
2105 void UserManagerImpl::DeleteUser(User* user) { 2098 void UserManagerImpl::DeleteUser(User* user) {
2106 const bool is_active_user = (user == active_user_); 2099 const bool is_active_user = (user == active_user_);
2107 delete user; 2100 delete user;
2108 if (is_active_user) 2101 if (is_active_user)
2109 active_user_ = NULL; 2102 active_user_ = NULL;
2110 } 2103 }
2111 2104
2112 } // namespace chromeos 2105 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/error_screen.cc ('k') | chrome/browser/chromeos/net/network_portal_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698