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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 } | 111 } |
112 | 112 |
113 base::string16 User::GetGivenName() const { | 113 base::string16 User::GetGivenName() const { |
114 return given_name_; | 114 return given_name_; |
115 } | 115 } |
116 | 116 |
117 const gfx::ImageSkia& User::GetImage() const { | 117 const gfx::ImageSkia& User::GetImage() const { |
118 return user_image_.image(); | 118 return user_image_.image(); |
119 } | 119 } |
120 | 120 |
121 std::string User::GetUserID() const { | 121 UserID User::GetUserID() const { |
122 return gaia::CanonicalizeEmail(gaia::SanitizeEmail(email())); | 122 return gaia::CanonicalizeEmail(gaia::SanitizeEmail(email())); |
123 } | 123 } |
124 | 124 |
125 void User::SetIsChild(bool is_child) { | 125 void User::SetIsChild(bool is_child) { |
126 VLOG(1) << "Ignoring SetIsChild call with param " << is_child; | 126 VLOG(1) << "Ignoring SetIsChild call with param " << is_child; |
127 if (is_child) { | 127 if (is_child) { |
128 NOTREACHED() << "Calling SetIsChild(true) for base User class." | 128 NOTREACHED() << "Calling SetIsChild(true) for base User class." |
129 << "Base class cannot be set as child"; | 129 << "Base class cannot be set as child"; |
130 } | 130 } |
131 } | 131 } |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 case user_manager::USER_TYPE_SUPERVISED: | 319 case user_manager::USER_TYPE_SUPERVISED: |
320 case user_manager::USER_TYPE_KIOSK_APP: | 320 case user_manager::USER_TYPE_KIOSK_APP: |
321 return false; | 321 return false; |
322 default: | 322 default: |
323 NOTREACHED(); | 323 NOTREACHED(); |
324 } | 324 } |
325 return false; | 325 return false; |
326 } | 326 } |
327 | 327 |
328 } // namespace user_manager | 328 } // namespace user_manager |
OLD | NEW |