Index: components/history/core/browser/history_service.h |
diff --git a/components/history/core/browser/history_service.h b/components/history/core/browser/history_service.h |
index c89868c9b4f974503c737d8b635469b089cd8f10..f240fedcb99b6597e107c453e1f5563df56087f7 100644 |
--- a/components/history/core/browser/history_service.h |
+++ b/components/history/core/browser/history_service.h |
@@ -644,18 +644,15 @@ class HistoryService : public syncer::SyncableService, public KeyedService { |
// FaviconService. |
// Used by FaviconService to get the favicon bitmaps from the history backend |
- // whose edge sizes most closely match |desired_sizes| for |icon_types|. If |
+ // whose edge sizes most closely match |desired_sizes| for |icon_type|. If |
// |desired_sizes| has a '0' entry, the largest favicon bitmap for |
- // |icon_types| is returned. The returned FaviconBitmapResults will have at |
+ // |icon_type| is returned. The returned FaviconBitmapResults will have at |
// most one result for each entry in |desired_sizes|. If a favicon bitmap is |
// determined to be the best candidate for multiple |desired_sizes| there will |
// be fewer results. |
- // If |icon_types| has several types, results for only a single type will be |
- // returned in the priority of TOUCH_PRECOMPOSED_ICON, TOUCH_ICON, and |
- // FAVICON. |
- base::CancelableTaskTracker::TaskId GetFavicons( |
- const std::vector<GURL>& icon_urls, |
- int icon_types, |
+ base::CancelableTaskTracker::TaskId GetFavicon( |
+ const GURL& icon_url, |
+ favicon_base::IconType icon_type, |
const std::vector<int>& desired_sizes, |
const favicon_base::FaviconResultsCallback& callback, |
base::CancelableTaskTracker* tracker); |
@@ -704,28 +701,16 @@ class HistoryService : public syncer::SyncableService, public KeyedService { |
const favicon_base::FaviconResultsCallback& callback, |
base::CancelableTaskTracker* tracker); |
- // Used by the FaviconService to replace the favicon mappings to |page_url| |
- // for |icon_types| on the history backend. |
- // 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 whose edge sizes most closely match |desired_sizes| |
- // from the favicons which were just mapped to |page_url| are returned. If |
- // |desired_sizes| has a '0' entry, 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 |
+ // just mapped to |page_url| are returned. If |desired_sizes| has a '0' entry, |
+ // the largest favicon bitmap is returned. |
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, |
const std::vector<int>& desired_sizes, |
const favicon_base::FaviconResultsCallback& callback, |
base::CancelableTaskTracker* tracker); |