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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 DCHECK(active_user_); | 433 DCHECK(active_user_); |
433 active_user_->set_is_logged_in(true); | 434 active_user_->set_is_logged_in(true); |
434 active_user_->set_is_active(true); | 435 active_user_->set_is_active(true); |
435 active_user_->set_username_hash(username_hash); | 436 active_user_->set_username_hash(username_hash); |
436 | 437 |
437 // Place user who just signed in to the top of the logged in users. | 438 // Place user who just signed in to the top of the logged in users. |
438 logged_in_users_.insert(logged_in_users_.begin(), active_user_); | 439 logged_in_users_.insert(logged_in_users_.begin(), active_user_); |
439 SetLRUUser(active_user_); | 440 SetLRUUser(active_user_); |
440 | 441 |
441 if (!primary_user_) { | 442 if (!primary_user_) { |
| 443 // Register CRLSet now that the home dir is mounted. |
| 444 if (!username_hash.empty()) { |
| 445 base::FilePath path; |
| 446 path = |
| 447 chromeos::ProfileHelper::GetProfilePathByUserIdHash(username_hash); |
| 448 component_updater::ComponentUpdateService* cus = |
| 449 g_browser_process->component_updater(); |
| 450 CRLSetFetcher* crl_set = g_browser_process->crl_set_fetcher(); |
| 451 if (crl_set && cus) |
| 452 crl_set->StartInitialLoad(cus, path); |
| 453 } |
442 primary_user_ = active_user_; | 454 primary_user_ = active_user_; |
443 if (primary_user_->GetType() == user_manager::USER_TYPE_REGULAR) | 455 if (primary_user_->GetType() == user_manager::USER_TYPE_REGULAR) |
444 SendRegularUserLoginMetrics(user_id); | 456 SendRegularUserLoginMetrics(user_id); |
445 } | 457 } |
446 | 458 |
447 UMA_HISTOGRAM_ENUMERATION("UserManager.LoginUserType", | 459 UMA_HISTOGRAM_ENUMERATION("UserManager.LoginUserType", |
448 active_user_->GetType(), | 460 active_user_->GetType(), |
449 user_manager::NUM_USER_TYPES); | 461 user_manager::NUM_USER_TYPES); |
450 | 462 |
451 g_browser_process->local_state()->SetString( | 463 g_browser_process->local_state()->SetString( |
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1773 } | 1785 } |
1774 | 1786 |
1775 void UserManagerImpl::DeleteUser(User* user) { | 1787 void UserManagerImpl::DeleteUser(User* user) { |
1776 const bool is_active_user = (user == active_user_); | 1788 const bool is_active_user = (user == active_user_); |
1777 delete user; | 1789 delete user; |
1778 if (is_active_user) | 1790 if (is_active_user) |
1779 active_user_ = NULL; | 1791 active_user_ = NULL; |
1780 } | 1792 } |
1781 | 1793 |
1782 } // namespace chromeos | 1794 } // namespace chromeos |
OLD | NEW |