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

Side by Side Diff: components/user_manager/user.cc

Issue 1440583002: This CL replaces e-mail with AccountId on user selection screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build. 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 | « components/user_manager/user.h ('k') | components/user_manager/user_info.h » ('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 "components/user_manager/user.h" 5 #include "components/user_manager/user.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 117
118 base::string16 User::GetGivenName() const { 118 base::string16 User::GetGivenName() const {
119 return given_name_; 119 return given_name_;
120 } 120 }
121 121
122 const gfx::ImageSkia& User::GetImage() const { 122 const gfx::ImageSkia& User::GetImage() const {
123 return user_image_.image(); 123 return user_image_.image();
124 } 124 }
125 125
126 AccountId User::GetAccountId() const { 126 const AccountId& User::GetAccountId() const {
127 return AccountId::FromUserEmail( 127 return account_id_;
128 gaia::CanonicalizeEmail(gaia::SanitizeEmail(email())));
129 } 128 }
130 129
131 void User::SetIsChild(bool is_child) { 130 void User::SetIsChild(bool is_child) {
132 VLOG(1) << "Ignoring SetIsChild call with param " << is_child; 131 VLOG(1) << "Ignoring SetIsChild call with param " << is_child;
133 if (is_child) { 132 if (is_child) {
134 NOTREACHED() << "Calling SetIsChild(true) for base User class." 133 NOTREACHED() << "Calling SetIsChild(true) for base User class."
135 << "Base class cannot be set as child"; 134 << "Base class cannot be set as child";
136 } 135 }
137 } 136 }
138 137
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 case user_manager::USER_TYPE_SUPERVISED: 312 case user_manager::USER_TYPE_SUPERVISED:
314 case user_manager::USER_TYPE_KIOSK_APP: 313 case user_manager::USER_TYPE_KIOSK_APP:
315 return false; 314 return false;
316 default: 315 default:
317 NOTREACHED(); 316 NOTREACHED();
318 } 317 }
319 return false; 318 return false;
320 } 319 }
321 320
322 } // namespace user_manager 321 } // namespace user_manager
OLDNEW
« no previous file with comments | « components/user_manager/user.h ('k') | components/user_manager/user_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698