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

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

Issue 13633003: Part of multiprofile implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Little cleanup. Created 7 years, 8 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
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 #include <vector> 9 #include <vector>
10 10
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 device_local_account_policy_service_->AddObserver(this); 649 device_local_account_policy_service_->AddObserver(this);
650 } 650 }
651 CheckOwnership(); 651 CheckOwnership();
652 RetrieveTrustedDevicePolicies(); 652 RetrieveTrustedDevicePolicies();
653 break; 653 break;
654 case chrome::NOTIFICATION_PROFILE_ADDED: 654 case chrome::NOTIFICATION_PROFILE_ADDED:
655 if (IsUserLoggedIn() && !IsLoggedInAsGuest() && 655 if (IsUserLoggedIn() && !IsLoggedInAsGuest() &&
656 !IsLoggedInAsLocallyManagedUser()) { 656 !IsLoggedInAsLocallyManagedUser()) {
657 Profile* profile = content::Source<Profile>(source).ptr(); 657 Profile* profile = content::Source<Profile>(source).ptr();
658 if (!profile->IsOffTheRecord() && 658 if (!profile->IsOffTheRecord() &&
659 // TODO(nkostylev): We should observe all logged in user's profiles.
659 profile == ProfileManager::GetDefaultProfile()) { 660 profile == ProfileManager::GetDefaultProfile()) {
660 DCHECK(NULL == observed_sync_service_); 661 DCHECK(NULL == observed_sync_service_);
661 observed_sync_service_ = 662 observed_sync_service_ =
662 ProfileSyncServiceFactory::GetForProfile(profile); 663 ProfileSyncServiceFactory::GetForProfile(profile);
663 if (observed_sync_service_) 664 if (observed_sync_service_)
664 observed_sync_service_->AddObserver(this); 665 observed_sync_service_->AddObserver(this);
665 } 666 }
666 } 667 }
667 break; 668 break;
668 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
1294 content::NotificationService::NoDetails()); 1295 content::NotificationService::NoDetails());
1295 } 1296 }
1296 1297
1297 void UserManagerImpl::NotifyMergeSessionStateChanged() { 1298 void UserManagerImpl::NotifyMergeSessionStateChanged() {
1298 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1299 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1299 FOR_EACH_OBSERVER(UserManager::Observer, observer_list_, 1300 FOR_EACH_OBSERVER(UserManager::Observer, observer_list_,
1300 MergeSessionStateChanged(merge_session_state_)); 1301 MergeSessionStateChanged(merge_session_state_));
1301 } 1302 }
1302 1303
1303 } // namespace chromeos 1304 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698