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

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

Issue 1747843002: Rename raw_image() to image_bytes() in UserImage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 9 months 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_image/user_image.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 <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
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
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
OLDNEW
« no previous file with comments | « components/user_manager/user.h ('k') | components/user_manager/user_image/user_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698