| 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 "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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |