Chromium Code Reviews| 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/users/user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/users/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 25 matching lines...) Expand all Loading... | |
| 36 #include "chrome/browser/chromeos/login/signin/auth_sync_observer_factory.h" | 36 #include "chrome/browser/chromeos/login/signin/auth_sync_observer_factory.h" |
| 37 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h" | 37 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h" |
| 38 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" | 38 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" |
| 39 #include "chrome/browser/chromeos/login/users/remove_user_delegate.h" | 39 #include "chrome/browser/chromeos/login/users/remove_user_delegate.h" |
| 40 #include "chrome/browser/chromeos/login/users/supervised_user_manager_impl.h" | 40 #include "chrome/browser/chromeos/login/users/supervised_user_manager_impl.h" |
| 41 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 41 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 42 #include "chrome/browser/chromeos/policy/device_local_account.h" | 42 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 43 #include "chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog. h" | 43 #include "chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog. h" |
| 44 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 44 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 45 #include "chrome/browser/chromeos/session_length_limiter.h" | 45 #include "chrome/browser/chromeos/session_length_limiter.h" |
| 46 #include "chrome/browser/net/crl_set_fetcher.h" | |
| 46 #include "chrome/browser/profiles/profile.h" | 47 #include "chrome/browser/profiles/profile.h" |
| 47 #include "chrome/browser/supervised_user/chromeos/manager_password_service_facto ry.h" | 48 #include "chrome/browser/supervised_user/chromeos/manager_password_service_facto ry.h" |
| 48 #include "chrome/browser/supervised_user/chromeos/supervised_user_password_servi ce_factory.h" | 49 #include "chrome/browser/supervised_user/chromeos/supervised_user_password_servi ce_factory.h" |
| 49 #include "chrome/common/chrome_constants.h" | 50 #include "chrome/common/chrome_constants.h" |
| 50 #include "chrome/common/chrome_paths.h" | 51 #include "chrome/common/chrome_paths.h" |
| 51 #include "chrome/common/chrome_switches.h" | 52 #include "chrome/common/chrome_switches.h" |
| 52 #include "chrome/common/crash_keys.h" | 53 #include "chrome/common/crash_keys.h" |
| 53 #include "chrome/common/pref_names.h" | 54 #include "chrome/common/pref_names.h" |
| 54 #include "chromeos/chromeos_switches.h" | 55 #include "chromeos/chromeos_switches.h" |
| 55 #include "chromeos/cryptohome/async_method_caller.h" | 56 #include "chromeos/cryptohome/async_method_caller.h" |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 431 DCHECK(active_user_); | 432 DCHECK(active_user_); |
| 432 active_user_->set_is_logged_in(true); | 433 active_user_->set_is_logged_in(true); |
| 433 active_user_->set_is_active(true); | 434 active_user_->set_is_active(true); |
| 434 active_user_->set_username_hash(username_hash); | 435 active_user_->set_username_hash(username_hash); |
| 435 | 436 |
| 436 // Place user who just signed in to the top of the logged in users. | 437 // Place user who just signed in to the top of the logged in users. |
| 437 logged_in_users_.insert(logged_in_users_.begin(), active_user_); | 438 logged_in_users_.insert(logged_in_users_.begin(), active_user_); |
| 438 SetLRUUser(active_user_); | 439 SetLRUUser(active_user_); |
| 439 | 440 |
| 440 if (!primary_user_) { | 441 if (!primary_user_) { |
| 442 | |
|
Jorge Lucangeli Obes
2014/07/16 16:36:34
Style nit: no need to leave empty line here.
You
| |
| 443 // Register CRLSet now home dir is mounted. | |
|
Jorge Lucangeli Obes
2014/07/16 16:36:34
"now that"?
Ryan Sleevi
2014/07/16 19:39:28
"now that the" ?
| |
| 444 if (!active_user_->username_hash().empty()) { | |
| 445 component_updater::ComponentUpdateService* cus = | |
| 446 g_browser_process->component_updater(); | |
| 447 g_browser_process->crl_set_fetcher()-> | |
| 448 StartInitialLoadWithHash(cus, active_user_->username_hash()); | |
| 449 } | |
| 441 primary_user_ = active_user_; | 450 primary_user_ = active_user_; |
| 442 if (primary_user_->GetType() == user_manager::USER_TYPE_REGULAR) | 451 if (primary_user_->GetType() == user_manager::USER_TYPE_REGULAR) |
| 443 SendRegularUserLoginMetrics(user_id); | 452 SendRegularUserLoginMetrics(user_id); |
| 444 } | 453 } |
| 445 | 454 |
| 446 UMA_HISTOGRAM_ENUMERATION("UserManager.LoginUserType", | 455 UMA_HISTOGRAM_ENUMERATION("UserManager.LoginUserType", |
| 447 active_user_->GetType(), | 456 active_user_->GetType(), |
| 448 user_manager::NUM_USER_TYPES); | 457 user_manager::NUM_USER_TYPES); |
| 449 | 458 |
| 450 g_browser_process->local_state()->SetString( | 459 g_browser_process->local_state()->SetString( |
| (...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1768 } | 1777 } |
| 1769 | 1778 |
| 1770 void UserManagerImpl::DeleteUser(User* user) { | 1779 void UserManagerImpl::DeleteUser(User* user) { |
| 1771 const bool is_active_user = (user == active_user_); | 1780 const bool is_active_user = (user == active_user_); |
| 1772 delete user; | 1781 delete user; |
| 1773 if (is_active_user) | 1782 if (is_active_user) |
| 1774 active_user_ = NULL; | 1783 active_user_ = NULL; |
| 1775 } | 1784 } |
| 1776 | 1785 |
| 1777 } // namespace chromeos | 1786 } // namespace chromeos |
| OLD | NEW |