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

Unified Diff: chrome/browser/profiles/profile_avatar_icon_util.h

Issue 1487283005: Implement the new Sync Confirmation dialog on Linux and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_avatar_icon_util.h
diff --git a/chrome/browser/profiles/profile_avatar_icon_util.h b/chrome/browser/profiles/profile_avatar_icon_util.h
index f93cf56a1d72c8430c5f4c8eca761fe3a1ef16ed..f746118b7334bc53ea69b9451edf9915b54f35b8 100644
--- a/chrome/browser/profiles/profile_avatar_icon_util.h
+++ b/chrome/browser/profiles/profile_avatar_icon_util.h
@@ -19,6 +19,7 @@ namespace gfx {
class Image;
}
+class GURL;
class SkBitmap;
namespace profiles {
@@ -93,6 +94,16 @@ bool IsDefaultAvatarIconIndex(size_t index);
// is, returns true and its index through |icon_index|. If not, returns false.
bool IsDefaultAvatarIconUrl(const std::string& icon_url, size_t *icon_index);
+// Given an image URL this function builds a new URL set to |thumbnail_size|.
+// For example, if |thumbnail_size| was set to 256 and |old_url| was either:
+// https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/photo.jpg
+// or
+// https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s64-c/photo.jpg
+// then return value in |new_url| would be:
+// https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s256-c/photo.jpg
+bool GetImageURLWithThumbnailSize(
+ const GURL& old_url, int thumbnail_size, GURL* new_url);
+
} // namespace profiles
#endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698