Index: components/favicon/core/favicon_service.h |
diff --git a/components/favicon/core/favicon_service.h b/components/favicon/core/favicon_service.h |
index e2379671ceda7ae2b10657f7053d1382971116a8..bb3a72b5632d0acd8e1fa0cd37d9dc5870f62f2a 100644 |
--- a/components/favicon/core/favicon_service.h |
+++ b/components/favicon/core/favicon_service.h |
@@ -120,7 +120,7 @@ class FaviconService : public KeyedService { |
base::CancelableTaskTracker::TaskId GetLargestRawFaviconForPageURL( |
const GURL& page_url, |
const std::vector<int>& icon_types, |
- int minimum_size_in_pixels, |
+ int minimum_size_in_pixel, |
const favicon_base::FaviconRawBitmapCallback& callback, |
base::CancelableTaskTracker* tracker); |
@@ -131,6 +131,15 @@ class FaviconService : public KeyedService { |
const favicon_base::FaviconResultsCallback& callback, |
base::CancelableTaskTracker* tracker); |
+ // Requests the best large icon for the page at |page_url| given the requested |
+ // |desired_size_in_pixel|. If no good large icon can be found, return the |
huangs
2015/04/17 03:55:17
NIT: return --> returns
beaudoin
2015/04/17 14:50:52
Done.
|
+ // dominant color of a smaller icon, if available. |
+ base::CancelableTaskTracker::TaskId getLargeIcon( |
huangs
2015/04/17 03:55:17
NIT: Should capitalize => GetLargeIcon(); also fix
beaudoin
2015/04/17 14:50:52
Done.
|
+ const GURL& pageURL, |
huangs
2015/04/17 03:55:17
NIT: pageURL --> page_url
beaudoin
2015/04/17 14:50:52
Done.
|
+ int desired_size_in_pixel, |
+ const favicon_base::LargeIconCallback& callback, |
+ base::CancelableTaskTracker* tracker); |
+ |
// Set the favicon mappings to |page_url| for |icon_types| in the history |
// database. |
// Sample |icon_urls|: |
@@ -240,10 +249,23 @@ class FaviconService : public KeyedService { |
const std::vector<favicon_base::FaviconRawBitmapResult>& |
favicon_bitmap_results); |
+ // Intermediate callback for getLargeIcon(). Ensures the large icon is the |
huangs
2015/04/17 03:55:17
NIT: GetLargeIcon()
beaudoin
2015/04/17 14:50:52
Done.
|
+ // desired size, if not extract the dominant color and use this for invoking |
+ // |callback|. |
+ void RunLargeIconCallback( |
+ const favicon_base::LargeIconCallback& callback, |
+ int desired_size_in_pixel, |
+ const favicon_base::FaviconRawBitmapResult& bitmap_result); |
+ |
base::hash_set<MissingFaviconURLHash> missing_favicon_urls_; |
history::HistoryService* history_service_; |
FaviconClient* favicon_client_; |
+ // A pre-populated list of the types of icon files to consider when looking |
+ // for large icons. Note: this is simply an optimization over populating an |
+ // icon type vector on each request. |
+ std::vector<int> large_icon_types_; |
+ |
DISALLOW_COPY_AND_ASSIGN(FaviconService); |
}; |