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

Side by Side Diff: ash/system/supervised/tray_supervised_user.cc

Issue 2911493002: cros: Pull user info from session_controller_client.mojom into separate mojom. (Closed)
Patch Set: Fix ordering in typemaps Created 3 years, 7 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
« no previous file with comments | « ash/session/session_controller_unittest.cc ('k') | ash/system/user/tray_user.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/supervised/tray_supervised_user.h" 5 #include "ash/system/supervised/tray_supervised_user.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/resources/vector_icons/vector_icons.h" 9 #include "ash/resources/vector_icons/vector_icons.h"
10 #include "ash/session/session_controller.h" 10 #include "ash/session/session_controller.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if (!session_controller->IsUserSupervised()) 69 if (!session_controller->IsUserSupervised())
70 return; 70 return;
71 71
72 // Get the active user session. 72 // Get the active user session.
73 DCHECK(session_controller->IsActiveUserSessionStarted()); 73 DCHECK(session_controller->IsActiveUserSessionStarted());
74 const mojom::UserSession* const user_session = 74 const mojom::UserSession* const user_session =
75 session_controller->GetUserSession(0); 75 session_controller->GetUserSession(0);
76 DCHECK(user_session); 76 DCHECK(user_session);
77 77
78 // Only respond to updates for the active user. 78 // Only respond to updates for the active user.
79 if (user_session->account_id != account_id) 79 if (user_session->user_info->account_id != account_id)
80 return; 80 return;
81 81
82 // Show notifications when custodian data first becomes available on login 82 // Show notifications when custodian data first becomes available on login
83 // and if the custodian data changes. 83 // and if the custodian data changes.
84 if (custodian_email_ == user_session->custodian_email && 84 if (custodian_email_ == user_session->custodian_email &&
85 second_custodian_email_ == user_session->second_custodian_email) { 85 second_custodian_email_ == user_session->second_custodian_email) {
86 return; 86 return;
87 } 87 }
88 custodian_email_ = user_session->custodian_email; 88 custodian_email_ = user_session->custodian_email;
89 second_custodian_email_ = user_session->second_custodian_email; 89 second_custodian_email_ = user_session->second_custodian_email;
(...skipping 28 matching lines...) Expand all
118 if (second_custodian.empty()) { 118 if (second_custodian.empty()) {
119 return l10n_util::GetStringFUTF16( 119 return l10n_util::GetStringFUTF16(
120 IDS_ASH_CHILD_USER_IS_MANAGED_BY_ONE_PARENT_NOTICE, first_custodian); 120 IDS_ASH_CHILD_USER_IS_MANAGED_BY_ONE_PARENT_NOTICE, first_custodian);
121 } 121 }
122 return l10n_util::GetStringFUTF16( 122 return l10n_util::GetStringFUTF16(
123 IDS_ASH_CHILD_USER_IS_MANAGED_BY_TWO_PARENTS_NOTICE, first_custodian, 123 IDS_ASH_CHILD_USER_IS_MANAGED_BY_TWO_PARENTS_NOTICE, first_custodian,
124 second_custodian); 124 second_custodian);
125 } 125 }
126 126
127 } // namespace ash 127 } // namespace ash
OLDNEW
« no previous file with comments | « ash/session/session_controller_unittest.cc ('k') | ash/system/user/tray_user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698