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

Side by Side Diff: chrome/browser/profiles/profile_avatar_icon_util.cc

Issue 854433003: [Resources] Add profile-sized assets for the generic placeholder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: match variable name to asset file name Created 5 years, 11 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 | « chrome/app/theme/theme_resources.grd ('k') | chrome/browser/profiles/profile_info_cache.cc » ('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 "chrome/browser/profiles/profile_avatar_icon_util.h" 5 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 size_t GetGenericAvatarIconCount() { 299 size_t GetGenericAvatarIconCount() {
300 return kGenericAvatarIconsCount; 300 return kGenericAvatarIconsCount;
301 } 301 }
302 302
303 int GetPlaceholderAvatarIndex() { 303 int GetPlaceholderAvatarIndex() {
304 return kPlaceholderAvatarIcon; 304 return kPlaceholderAvatarIcon;
305 } 305 }
306 306
307 int GetPlaceholderAvatarIconResourceID() { 307 int GetPlaceholderAvatarIconResourceID() {
308 return IDR_PROFILE_AVATAR_26; 308 return IDR_PROFILE_AVATAR_PLACEHOLDER_LARGE;
309 } 309 }
310 310
311 const IconResourceInfo* GetDefaultAvatarIconResourceInfo(size_t index) { 311 const IconResourceInfo* GetDefaultAvatarIconResourceInfo(size_t index) {
312 static const IconResourceInfo resource_info[kDefaultAvatarIconsCount] = { 312 static const IconResourceInfo resource_info[kDefaultAvatarIconsCount] = {
313 { IDR_PROFILE_AVATAR_0, "avatar_generic.png"}, 313 { IDR_PROFILE_AVATAR_0, "avatar_generic.png"},
314 { IDR_PROFILE_AVATAR_1, "avatar_generic_aqua.png"}, 314 { IDR_PROFILE_AVATAR_1, "avatar_generic_aqua.png"},
315 { IDR_PROFILE_AVATAR_2, "avatar_generic_blue.png"}, 315 { IDR_PROFILE_AVATAR_2, "avatar_generic_blue.png"},
316 { IDR_PROFILE_AVATAR_3, "avatar_generic_green.png"}, 316 { IDR_PROFILE_AVATAR_3, "avatar_generic_green.png"},
317 { IDR_PROFILE_AVATAR_4, "avatar_generic_orange.png"}, 317 { IDR_PROFILE_AVATAR_4, "avatar_generic_orange.png"},
318 { IDR_PROFILE_AVATAR_5, "avatar_generic_purple.png"}, 318 { IDR_PROFILE_AVATAR_5, "avatar_generic_purple.png"},
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 int_value >= static_cast<int>(kDefaultAvatarIconsCount)) 386 int_value >= static_cast<int>(kDefaultAvatarIconsCount))
387 return false; 387 return false;
388 *icon_index = int_value; 388 *icon_index = int_value;
389 return true; 389 return true;
390 } 390 }
391 391
392 return false; 392 return false;
393 } 393 }
394 394
395 } // namespace profiles 395 } // namespace profiles
OLDNEW
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | chrome/browser/profiles/profile_info_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698