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(nkostylev): Mayby we should observe all logged in user's | |
Nikita (slow)
2013/04/08 13:09:44
nit: Drop Maybe
dzhioev (left Google)
2013/04/11 15:26:47
Done.
| |
659 // profiles. | |
658 profile == ProfileManager::GetDefaultProfile()) { | 660 profile == ProfileManager::GetDefaultProfile()) { |
659 DCHECK(NULL == observed_sync_service_); | 661 DCHECK(NULL == observed_sync_service_); |
660 observed_sync_service_ = | 662 observed_sync_service_ = |
661 ProfileSyncServiceFactory::GetForProfile(profile); | 663 ProfileSyncServiceFactory::GetForProfile(profile); |
662 if (observed_sync_service_) | 664 if (observed_sync_service_) |
663 observed_sync_service_->AddObserver(this); | 665 observed_sync_service_->AddObserver(this); |
664 } | 666 } |
665 } | 667 } |
666 break; | 668 break; |
667 case chrome::NOTIFICATION_SYSTEM_SETTING_CHANGED: | 669 case chrome::NOTIFICATION_SYSTEM_SETTING_CHANGED: |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1293 content::NotificationService::NoDetails()); | 1295 content::NotificationService::NoDetails()); |
1294 } | 1296 } |
1295 | 1297 |
1296 void UserManagerImpl::NotifyMergeSessionStateChanged() { | 1298 void UserManagerImpl::NotifyMergeSessionStateChanged() { |
1297 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1299 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1298 FOR_EACH_OBSERVER(UserManager::Observer, observer_list_, | 1300 FOR_EACH_OBSERVER(UserManager::Observer, observer_list_, |
1299 MergeSessionStateChanged(merge_session_state_)); | 1301 MergeSessionStateChanged(merge_session_state_)); |
1300 } | 1302 } |
1301 | 1303 |
1302 } // namespace chromeos | 1304 } // namespace chromeos |
OLD | NEW |