OLD | NEW |
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 Loading... |
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 const AccountId& User::GetAccountId() const { | 126 AccountId User::GetAccountId() const { |
127 return account_id_; | 127 return AccountId::FromUserEmail( |
| 128 gaia::CanonicalizeEmail(gaia::SanitizeEmail(email()))); |
128 } | 129 } |
129 | 130 |
130 void User::SetIsChild(bool is_child) { | 131 void User::SetIsChild(bool is_child) { |
131 VLOG(1) << "Ignoring SetIsChild call with param " << is_child; | 132 VLOG(1) << "Ignoring SetIsChild call with param " << is_child; |
132 if (is_child) { | 133 if (is_child) { |
133 NOTREACHED() << "Calling SetIsChild(true) for base User class." | 134 NOTREACHED() << "Calling SetIsChild(true) for base User class." |
134 << "Base class cannot be set as child"; | 135 << "Base class cannot be set as child"; |
135 } | 136 } |
136 } | 137 } |
137 | 138 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 case user_manager::USER_TYPE_SUPERVISED: | 313 case user_manager::USER_TYPE_SUPERVISED: |
313 case user_manager::USER_TYPE_KIOSK_APP: | 314 case user_manager::USER_TYPE_KIOSK_APP: |
314 return false; | 315 return false; |
315 default: | 316 default: |
316 NOTREACHED(); | 317 NOTREACHED(); |
317 } | 318 } |
318 return false; | 319 return false; |
319 } | 320 } |
320 | 321 |
321 } // namespace user_manager | 322 } // namespace user_manager |
OLD | NEW |