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

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

Issue 785893003: Adapt Chrome OS related part of ChildAccountService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ClearUserList method updated for mock. Created 6 years 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
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 const gfx::ImageSkia& User::GetImage() const { 129 const gfx::ImageSkia& User::GetImage() const {
130 return user_image_.image(); 130 return user_image_.image();
131 } 131 }
132 132
133 std::string User::GetUserID() const { 133 std::string User::GetUserID() const {
134 return gaia::CanonicalizeEmail(gaia::SanitizeEmail(email())); 134 return gaia::CanonicalizeEmail(gaia::SanitizeEmail(email()));
135 } 135 }
136 136
137 void User::SetIsSupervised(bool is_supervised) { 137 void User::SetIsSupervised(bool is_supervised) {
138 VLOG(1) << "Ignoring SetIsSupervised call with param " << is_supervised; 138 VLOG(1) << "Ignoring SetIsSupervised call with param " << is_supervised;
139 NOTREACHED() << "Calling SetIsSupervised for base User class."; 139 if (is_supervised) {
140 NOTREACHED() << "Calling SetIsSupervised(true) for base User class. "
141 << "Base class cannot be set as supervised";
142 }
140 } 143 }
141 144
142 bool User::HasGaiaAccount() const { 145 bool User::HasGaiaAccount() const {
143 return TypeHasGaiaAccount(GetType()); 146 return TypeHasGaiaAccount(GetType());
144 } 147 }
145 148
146 bool User::IsSupervised() const { 149 bool User::IsSupervised() const {
147 UserType type = GetType(); 150 UserType type = GetType();
148 return type == USER_TYPE_SUPERVISED || 151 return type == USER_TYPE_SUPERVISED ||
149 type == USER_TYPE_REGULAR_SUPERVISED; 152 type == USER_TYPE_REGULAR_SUPERVISED;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 case user_manager::USER_TYPE_SUPERVISED: 346 case user_manager::USER_TYPE_SUPERVISED:
344 case user_manager::USER_TYPE_KIOSK_APP: 347 case user_manager::USER_TYPE_KIOSK_APP:
345 return false; 348 return false;
346 default: 349 default:
347 NOTREACHED(); 350 NOTREACHED();
348 } 351 }
349 return false; 352 return false;
350 } 353 }
351 354
352 } // namespace user_manager 355 } // namespace user_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698