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

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: m 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 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 device_local_account_policy_service_->AddObserver(this); 716 device_local_account_policy_service_->AddObserver(this);
717 } 717 }
718 CheckOwnership(); 718 CheckOwnership();
719 RetrieveTrustedDevicePolicies(); 719 RetrieveTrustedDevicePolicies();
720 break; 720 break;
721 case chrome::NOTIFICATION_PROFILE_ADDED: 721 case chrome::NOTIFICATION_PROFILE_ADDED:
722 if (IsUserLoggedIn() && !IsLoggedInAsGuest() && 722 if (IsUserLoggedIn() && !IsLoggedInAsGuest() &&
723 !IsLoggedInAsLocallyManagedUser()) { 723 !IsLoggedInAsLocallyManagedUser()) {
724 Profile* profile = content::Source<Profile>(source).ptr(); 724 Profile* profile = content::Source<Profile>(source).ptr();
725 if (!profile->IsOffTheRecord() && 725 if (!profile->IsOffTheRecord() &&
726 // TODO(nkostylev): We should observe all logged in user's profiles.
726 profile == ProfileManager::GetDefaultProfile()) { 727 profile == ProfileManager::GetDefaultProfile()) {
727 DCHECK(NULL == observed_sync_service_); 728 DCHECK(NULL == observed_sync_service_);
728 observed_sync_service_ = 729 observed_sync_service_ =
729 ProfileSyncServiceFactory::GetForProfile(profile); 730 ProfileSyncServiceFactory::GetForProfile(profile);
730 if (observed_sync_service_) 731 if (observed_sync_service_)
731 observed_sync_service_->AddObserver(this); 732 observed_sync_service_->AddObserver(this);
732 } 733 }
733 } 734 }
734 break; 735 break;
735 case chrome::NOTIFICATION_SYSTEM_SETTING_CHANGED: 736 case chrome::NOTIFICATION_SYSTEM_SETTING_CHANGED:
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 content::NotificationService::NoDetails()); 1387 content::NotificationService::NoDetails());
1387 } 1388 }
1388 1389
1389 void UserManagerImpl::NotifyMergeSessionStateChanged() { 1390 void UserManagerImpl::NotifyMergeSessionStateChanged() {
1390 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1391 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1391 FOR_EACH_OBSERVER(UserManager::Observer, observer_list_, 1392 FOR_EACH_OBSERVER(UserManager::Observer, observer_list_,
1392 MergeSessionStateChanged(merge_session_state_)); 1393 MergeSessionStateChanged(merge_session_state_));
1393 } 1394 }
1394 1395
1395 } // namespace chromeos 1396 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/terms_of_service_screen.cc ('k') | chrome/browser/chromeos/login/webui_login_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698