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

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

Issue 2828173002: [Refactor] Simplify HistoryBackend::UpdateFaviconMappingsAndFetchImpl() signature (Closed)
Patch Set: Merge branch 'master' into icon_type0 Created 3 years, 8 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
« no previous file with comments | « components/favicon/core/favicon_handler_unittest.cc ('k') | components/favicon/core/favicon_service_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/favicon/core/favicon_service.h
diff --git a/components/favicon/core/favicon_service.h b/components/favicon/core/favicon_service.h
index 8ac749f8419265319ec846df441256272f6d6e6b..526b5f613d139741210d271623102a91445ea9f5 100644
--- a/components/favicon/core/favicon_service.h
+++ b/components/favicon/core/favicon_service.h
@@ -117,30 +117,16 @@ class FaviconService : public KeyedService {
const favicon_base::FaviconResultsCallback& callback,
base::CancelableTaskTracker* tracker) = 0;
- // Set the favicon mappings to |page_url| for |icon_types| in the history
- // database.
- // Sample |icon_urls|:
- // { ICON_URL1 -> TOUCH_ICON, known to the database,
- // ICON_URL2 -> TOUCH_ICON, not known to the database,
- // ICON_URL3 -> TOUCH_PRECOMPOSED_ICON, known to the database }
- // The new mappings are computed from |icon_urls| with these rules:
- // 1) Any urls in |icon_urls| which are not already known to the database are
- // rejected.
- // Sample new mappings to |page_url|: { ICON_URL1, ICON_URL3 }
- // 2) If |icon_types| has multiple types, the mappings are only set for the
- // largest icon type.
- // Sample new mappings to |page_url|: { ICON_URL3 }
- // |icon_types| can only have multiple IconTypes if
- // |icon_types| == TOUCH_ICON | TOUCH_PRECOMPOSED_ICON.
- // The favicon bitmaps which most closely match |desired_size_in_dip|
- // at the reosurce scale factors supported by the current platform (eg MacOS)
- // in addition to 1x from the favicons which were just mapped to |page_url|
- // are returned. If |desired_size_in_dip| is 0, the largest favicon bitmap is
- // returned.
+ // Maps |page_url| to the favicon at |icon_url| if there is an entry in the
+ // database for |icon_url| and |icon_type|. This occurs when there is a
+ // mapping from a different page URL to |icon_url|. The favicon bitmaps whose
+ // edge sizes most closely match |desired_sizes| from the favicons which were
mastiz 2017/04/20 09:11:35 s/desired_sizes/desired_size_in_dip/
+ // just mapped to |page_url| are returned. If |desired_sizes| has a '0' entry,
mastiz 2017/04/20 09:11:35 Ditto.
+ // the largest favicon bitmap is returned.
virtual base::CancelableTaskTracker::TaskId UpdateFaviconMappingsAndFetch(
const GURL& page_url,
- const std::vector<GURL>& icon_urls,
- int icon_types,
+ const GURL& icon_url,
+ favicon_base::IconType icon_type,
int desired_size_in_dip,
const favicon_base::FaviconResultsCallback& callback,
base::CancelableTaskTracker* tracker) = 0;
« no previous file with comments | « components/favicon/core/favicon_handler_unittest.cc ('k') | components/favicon/core/favicon_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698