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

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

Issue 2066093003: Refactor fetching profile avatar icons and labels repeated md-settings & md-user-manager (C++) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@avatar-selector-refactor
Patch Set: Addressed comments Created 4 years, 6 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
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 #ifndef CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory>
10 #include <string> 11 #include <string>
11 12
12 #include "third_party/skia/include/core/SkColor.h" 13 #include "third_party/skia/include/core/SkColor.h"
13 14
14 namespace base { 15 namespace base {
15 class FilePath; 16 class FilePath;
17 class ListValue;
16 } 18 }
17 19
18 namespace gfx { 20 namespace gfx {
19 class Image; 21 class Image;
20 } 22 }
21 23
22 class GURL; 24 class GURL;
23 class SkBitmap; 25 class SkBitmap;
24 26
25 namespace profiles { 27 namespace profiles {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Given an image URL this function builds a new URL set to |thumbnail_size|. 102 // Given an image URL this function builds a new URL set to |thumbnail_size|.
101 // For example, if |thumbnail_size| was set to 256 and |old_url| was either: 103 // For example, if |thumbnail_size| was set to 256 and |old_url| was either:
102 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/photo.jpg 104 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/photo.jpg
103 // or 105 // or
104 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s64-c/photo.jpg 106 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s64-c/photo.jpg
105 // then return value in |new_url| would be: 107 // then return value in |new_url| would be:
106 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s256-c/photo.jpg 108 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s256-c/photo.jpg
107 bool GetImageURLWithThumbnailSize( 109 bool GetImageURLWithThumbnailSize(
108 const GURL& old_url, int thumbnail_size, GURL* new_url); 110 const GURL& old_url, int thumbnail_size, GURL* new_url);
109 111
112 // Returns a list of dictionaries containing default profile avatar icons and
113 // labels.
Mike Lerman 2016/06/20 00:42:54 Please note how this list is ordered. Also note -
Moe 2016/06/20 17:24:08 a. I amended the comment to note what the labels a
Mike Lerman 2016/06/20 17:38:02 Ah, those labels used to also be the default profi
114 std::unique_ptr<base::ListValue> GetDefaultProfileAvatarIconsAndLabels();
115
110 } // namespace profiles 116 } // namespace profiles
111 117
112 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ 118 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698