Index: chrome/browser/history/history.cc |
diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc |
index e67a0cc79dbb1703a6691fc78ae80ba4fc3cb77a..61af0d60590bd3b653951ffe13085a8c80ab0ca6 100644 |
--- a/chrome/browser/history/history.cc |
+++ b/chrome/browser/history/history.cc |
@@ -491,52 +491,71 @@ HistoryService::Handle HistoryService::GetPageThumbnail( |
new history::GetPageThumbnailRequest(callback), page_url); |
} |
-void HistoryService::GetFavicon(FaviconService::GetFaviconRequest* request, |
- const GURL& icon_url, |
- history::IconType icon_type) { |
+void HistoryService::GetFavicon( |
+ FaviconService::GetFaviconRequest* request, |
+ const std::vector<GURL>& icon_urls, |
+ history::IconType icon_type, |
+ const gfx::Size& desired_dip_size, |
+ const std::vector<ui::ScaleFactor>& desired_scale_factors) { |
Schedule(PRIORITY_NORMAL, &HistoryBackend::GetFavicon, NULL, request, |
- icon_url, icon_type); |
+ icon_urls, icon_type, desired_dip_size, desired_scale_factors); |
} |
-void HistoryService::UpdateFaviconMappingAndFetch( |
+void HistoryService::GetFaviconForURL( |
FaviconService::GetFaviconRequest* request, |
const GURL& page_url, |
- const GURL& icon_url, |
- history::IconType icon_type) { |
- Schedule(PRIORITY_NORMAL, &HistoryBackend::UpdateFaviconMappingAndFetch, NULL, |
- request, page_url, icon_url, history::FAVICON); |
+ int icon_types, |
+ const gfx::Size& desired_dip_size, |
+ const std::vector<ui::ScaleFactor>& desired_scale_factors) { |
+ Schedule(PRIORITY_NORMAL, &HistoryBackend::GetFaviconForURL, NULL, request, |
+ page_url, icon_types, desired_dip_size, desired_scale_factors); |
} |
-void HistoryService::GetFaviconForURL( |
+void HistoryService::UpdateFaviconMappingsAndFetch( |
FaviconService::GetFaviconRequest* request, |
const GURL& page_url, |
- int icon_types) { |
- Schedule(PRIORITY_NORMAL, &HistoryBackend::GetFaviconForURL, NULL, request, |
- page_url, icon_types); |
+ const std::vector<GURL>& icon_urls, |
+ history::IconType icon_type, |
+ const gfx::Size& desired_dip_size, |
+ const std::vector<ui::ScaleFactor>& desired_scale_factors) { |
+ Schedule(PRIORITY_NORMAL, &HistoryBackend::UpdateFaviconMappingsAndFetch, |
+ NULL, request, page_url, icon_urls, icon_type, desired_dip_size, |
+ desired_scale_factors); |
} |
-void HistoryService::SetFavicon(const GURL& page_url, |
- const GURL& icon_url, |
- const std::vector<unsigned char>& image_data, |
- history::IconType icon_type) { |
+void HistoryService::AddFavicons( |
+ const GURL& page_url, |
+ const GURL& icon_url, |
+ history::IconType icon_type, |
+ const std::vector<history::FaviconBitmapData>& favicon_bitmaps) { |
+ if (!CanAddURL(page_url)) |
+ return; |
+ |
+ ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::AddFavicons, page_url, |
+ icon_url, icon_type, favicon_bitmaps); |
+} |
+ |
+void HistoryService::SetFavicons( |
+ const GURL& page_url, |
+ const GURL& icon_url, |
+ history::IconType icon_type, |
+ const std::vector<history::FaviconBitmapData>& favicon_bitmaps, |
+ const history::IconURLSizesMap& icon_url_sizes) { |
if (!CanAddURL(page_url)) |
return; |
- ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::SetFavicon, |
- page_url, icon_url, |
- scoped_refptr<base::RefCountedMemory>( |
- new base::RefCountedBytes(image_data)), |
- icon_type); |
+ ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::SetFavicons, page_url, |
+ icon_url, icon_type, favicon_bitmaps, icon_url_sizes); |
} |
-void HistoryService::SetFaviconOutOfDateForPage(const GURL& page_url) { |
+void HistoryService::SetFaviconsOutOfDateForPage(const GURL& page_url) { |
ScheduleAndForget(PRIORITY_NORMAL, |
- &HistoryBackend::SetFaviconOutOfDateForPage, page_url); |
+ &HistoryBackend::SetFaviconsOutOfDateForPage, page_url); |
} |
-void HistoryService::CloneFavicon(const GURL& old_page_url, |
+void HistoryService::CloneFavicons(const GURL& old_page_url, |
const GURL& new_page_url) { |
- ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::CloneFavicon, |
+ ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::CloneFavicons, |
old_page_url, new_page_url); |
} |