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.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: 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 <string> 10 #include <string>
11 11
12 #include "base/values.h"
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;
16 } 17 }
17 18
18 namespace gfx { 19 namespace gfx {
19 class Image; 20 class Image;
20 } 21 }
21 22
(...skipping 78 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|. 101 // 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: 102 // For example, if |thumbnail_size| was set to 256 and |old_url| was either:
102 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/photo.jpg 103 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/photo.jpg
103 // or 104 // or
104 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s64-c/photo.jpg 105 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s64-c/photo.jpg
105 // then return value in |new_url| would be: 106 // then return value in |new_url| would be:
106 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s256-c/photo.jpg 107 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s256-c/photo.jpg
107 bool GetImageURLWithThumbnailSize( 108 bool GetImageURLWithThumbnailSize(
108 const GURL& old_url, int thumbnail_size, GURL* new_url); 109 const GURL& old_url, int thumbnail_size, GURL* new_url);
109 110
111 // Returns a list of dictionaries containing default profile avatar icons and
112 // labels.
113 std::unique_ptr<base::ListValue> GetDefaultProfileAvatarIconsAndLabels();
tommycli 2016/06/15 21:22:44 nit: Can ListValue be forward declared here and va
Moe 2016/06/16 13:36:46 Good point. Done.
114
110 } // namespace profiles 115 } // namespace profiles
111 116
112 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ 117 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698