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

Unified Diff: components/favicon/core/large_icon_service.h

Issue 2883293002: LargeIconService returns icon of the desired size (Closed)
Patch Set: Add comment and change the logic of the min size Created 3 years, 7 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: components/favicon/core/large_icon_service.h
diff --git a/components/favicon/core/large_icon_service.h b/components/favicon/core/large_icon_service.h
index d07888a044cf785f55589040f29783effef229d8..74c3555f3dd0784f354fbed0c34d7867f4b71f55 100644
--- a/components/favicon/core/large_icon_service.h
+++ b/components/favicon/core/large_icon_service.h
@@ -38,15 +38,19 @@ class LargeIconService : public KeyedService {
~LargeIconService() override;
// Requests the best large icon for the page at |page_url|.
- // Case 1. An icon exists whose size is >= |min_source_size_in_pixel|:
+ // Case 1. An icon exists whose size is >= MAX(|min_source_size_in_pixel|,
+ // |desired_size_in_pixel|):
// - If |desired_size_in_pixel| == 0: returns icon as is.
// - Else: returns the icon resized to |desired_size_in_pixel|.
- // Case 2. An icon exists whose size is < |min_source_size_in_pixel|:
+ // Case 2. An icon exists whose size is >= |min_source_size_in_pixel| and <
+ // |desired_size_in_pixel|:
+ // - Same as 1 with the biggest icon.
+ // Case 4. An icon exists whose size is < |min_source_size_in_pixel|:
jkrcal 2017/05/18 12:33:55 Where is Case 3?
// - Extracts dominant color of smaller image, returns a fallback icon style
// that has a matching background.
- // Case 3. No icon exists.
+ // Case 5. No icon exists.
// - Returns the default fallback icon style.
- // For cases 2 and 3, this function returns the style of the fallback icon
+ // For cases 4 and 5, this function returns the style of the fallback icon
// instead of rendering an icon so clients can render the icon themselves.
// TODO(jkrcal): Rename to GetLargeIconRawBitmapOrFallbackStyle.
base::CancelableTaskTracker::TaskId GetLargeIconOrFallbackStyle(
« no previous file with comments | « no previous file | components/favicon/core/large_icon_service.cc » ('j') | components/favicon/core/large_icon_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698