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

Unified Diff: chrome/browser/ui/ash/palette_delegate_chromeos.cc

Issue 2661283002: cros: Clean up SessionStateDelegate refs in Chrome (Closed)
Patch Set: update browser_finder_chromeos_unittest Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/palette_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/palette_delegate_chromeos.cc b/chrome/browser/ui/ash/palette_delegate_chromeos.cc
index cc6db0d86cbcae37adf71c554c29ba8b4798de83..99443ac7fd154f64b01a6a788c493f0b5984e84f 100644
--- a/chrome/browser/ui/ash/palette_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/palette_delegate_chromeos.cc
@@ -56,11 +56,9 @@ bool PaletteDelegateChromeOS::HasNoteApp() {
return chromeos::NoteTakingHelper::Get()->IsAppAvailable(profile_);
}
-void PaletteDelegateChromeOS::ActiveUserChanged(const AccountId& account_id) {
- const user_manager::User* user =
- user_manager::UserManager::Get()->FindUser(account_id);
- Profile* profile = ProfileHelper::Get()->GetProfileByUser(user);
- SetProfile(profile);
+void PaletteDelegateChromeOS::ActiveUserChanged(
+ const user_manager::User* active_user) {
+ SetProfile(ProfileHelper::Get()->GetProfileByUser(active_user));
}
void PaletteDelegateChromeOS::Observe(
@@ -73,9 +71,9 @@ void PaletteDelegateChromeOS::Observe(
SetProfile(ProfileManager::GetActiveUserProfile());
// Add a session state observer to be able to monitor session changes.
- if (!session_state_observer_.get() && ash::Shell::HasInstance()) {
+ if (!session_state_observer_.get()) {
session_state_observer_.reset(
- new ash::ScopedSessionStateObserver(this));
+ new user_manager::ScopedUserSessionStateObserver(this));
}
break;
case chrome::NOTIFICATION_PROFILE_DESTROYED: {
« no previous file with comments | « chrome/browser/ui/ash/palette_delegate_chromeos.h ('k') | chrome/browser/ui/ash/session_controller_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698