| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 | 231 |
| 232 void User::SetAccountLocale(const std::string& resolved_account_locale) { | 232 void User::SetAccountLocale(const std::string& resolved_account_locale) { |
| 233 account_locale_.reset(new std::string(resolved_account_locale)); | 233 account_locale_.reset(new std::string(resolved_account_locale)); |
| 234 } | 234 } |
| 235 | 235 |
| 236 void User::SetImage(const UserImage& user_image, int image_index) { | 236 void User::SetImage(const UserImage& user_image, int image_index) { |
| 237 user_image_ = user_image; | 237 user_image_ = user_image; |
| 238 image_index_ = image_index; | 238 image_index_ = image_index; |
| 239 image_is_stub_ = false; | 239 image_is_stub_ = false; |
| 240 image_is_loading_ = false; | 240 image_is_loading_ = false; |
| 241 DCHECK(HasDefaultImage() || user_image.has_raw_image()); | 241 DCHECK(HasDefaultImage() || user_image.has_image_bytes()); |
| 242 } | 242 } |
| 243 | 243 |
| 244 void User::SetImageURL(const GURL& image_url) { | 244 void User::SetImageURL(const GURL& image_url) { |
| 245 user_image_.set_url(image_url); | 245 user_image_.set_url(image_url); |
| 246 } | 246 } |
| 247 | 247 |
| 248 void User::SetStubImage(const UserImage& stub_user_image, | 248 void User::SetStubImage(const UserImage& stub_user_image, |
| 249 int image_index, | 249 int image_index, |
| 250 bool is_loading) { | 250 bool is_loading) { |
| 251 user_image_ = stub_user_image; | 251 user_image_ = stub_user_image; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 case user_manager::USER_TYPE_SUPERVISED: | 354 case user_manager::USER_TYPE_SUPERVISED: |
| 355 case user_manager::USER_TYPE_KIOSK_APP: | 355 case user_manager::USER_TYPE_KIOSK_APP: |
| 356 return false; | 356 return false; |
| 357 default: | 357 default: |
| 358 NOTREACHED(); | 358 NOTREACHED(); |
| 359 } | 359 } |
| 360 return false; | 360 return false; |
| 361 } | 361 } |
| 362 | 362 |
| 363 } // namespace user_manager | 363 } // namespace user_manager |
| OLD | NEW |