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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
648 device_local_account_policy_service_->AddObserver(this); | 648 device_local_account_policy_service_->AddObserver(this); |
649 } | 649 } |
650 CheckOwnership(); | 650 CheckOwnership(); |
651 RetrieveTrustedDevicePolicies(); | 651 RetrieveTrustedDevicePolicies(); |
652 break; | 652 break; |
653 case chrome::NOTIFICATION_PROFILE_ADDED: | 653 case chrome::NOTIFICATION_PROFILE_ADDED: |
654 if (IsUserLoggedIn() && !IsLoggedInAsGuest() && | 654 if (IsUserLoggedIn() && !IsLoggedInAsGuest() && |
655 !IsLoggedInAsLocallyManagedUser()) { | 655 !IsLoggedInAsLocallyManagedUser()) { |
656 Profile* profile = content::Source<Profile>(source).ptr(); | 656 Profile* profile = content::Source<Profile>(source).ptr(); |
657 if (!profile->IsOffTheRecord() && | 657 if (!profile->IsOffTheRecord() && |
658 // TODO: Mayby we should observe all logged in user's profiles. | |
Nikita (slow)
2013/04/04 12:59:13
Please change to TODO(nkostylev)
| |
658 profile == ProfileManager::GetDefaultProfile()) { | 659 profile == ProfileManager::GetDefaultProfile()) { |
659 DCHECK(NULL == observed_sync_service_); | 660 DCHECK(NULL == observed_sync_service_); |
660 observed_sync_service_ = | 661 observed_sync_service_ = |
661 ProfileSyncServiceFactory::GetForProfile(profile); | 662 ProfileSyncServiceFactory::GetForProfile(profile); |
662 if (observed_sync_service_) | 663 if (observed_sync_service_) |
663 observed_sync_service_->AddObserver(this); | 664 observed_sync_service_->AddObserver(this); |
664 } | 665 } |
665 } | 666 } |
666 break; | 667 break; |
667 case chrome::NOTIFICATION_SYSTEM_SETTING_CHANGED: | 668 case chrome::NOTIFICATION_SYSTEM_SETTING_CHANGED: |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 |
OLD | NEW |