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

Side by Side Diff: ash/system/user/tray_user.cc

Issue 1428213004: This CL replaces std::string user_id in ash/* with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 5 years, 1 month 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
« no previous file with comments | « ash/system/tray/system_tray_delegate.cc ('k') | ash/system/user/user_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/system/user/tray_user.h" 5 #include "ash/system/user/tray_user.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/session/session_state_delegate.h" 9 #include "ash/session/session_state_delegate.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 return user_; 112 return user_;
113 } 113 }
114 114
115 views::View* TrayUser::CreateDetailedView(user::LoginStatus status) { 115 views::View* TrayUser::CreateDetailedView(user::LoginStatus status) {
116 const AccountId account_id = Shell::GetInstance() 116 const AccountId account_id = Shell::GetInstance()
117 ->session_state_delegate() 117 ->session_state_delegate()
118 ->GetUserInfo(0) 118 ->GetUserInfo(0)
119 ->GetAccountId(); 119 ->GetAccountId();
120 tray::UserAccountsDelegate* delegate = 120 tray::UserAccountsDelegate* delegate =
121 Shell::GetInstance()->system_tray_delegate()->GetUserAccountsDelegate( 121 Shell::GetInstance()->system_tray_delegate()->GetUserAccountsDelegate(
122 account_id.GetUserEmail()); 122 account_id);
123 if (!delegate) 123 if (!delegate)
124 return nullptr; 124 return nullptr;
125 return new tray::AccountsDetailedView(this, status, delegate); 125 return new tray::AccountsDetailedView(this, status, delegate);
126 } 126 }
127 127
128 void TrayUser::DestroyTrayView() { 128 void TrayUser::DestroyTrayView() {
129 layout_view_ = nullptr; 129 layout_view_ = nullptr;
130 avatar_ = nullptr; 130 avatar_ = nullptr;
131 label_ = nullptr; 131 label_ = nullptr;
132 } 132 }
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 void TrayUser::UpdateLayoutOfItem() { 291 void TrayUser::UpdateLayoutOfItem() {
292 RootWindowController* controller = GetRootWindowController( 292 RootWindowController* controller = GetRootWindowController(
293 system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow()); 293 system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow());
294 if (controller && controller->shelf()) { 294 if (controller && controller->shelf()) {
295 UpdateAfterShelfAlignmentChange( 295 UpdateAfterShelfAlignmentChange(
296 controller->GetShelfLayoutManager()->GetAlignment()); 296 controller->GetShelfLayoutManager()->GetAlignment());
297 } 297 }
298 } 298 }
299 299
300 } // namespace ash 300 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_delegate.cc ('k') | ash/system/user/user_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698