| Index: chrome/browser/history/history.cc
|
| diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc
|
| index 648de2963dd020abb15ab4cbc4f21a08d057b0e6..1fadfe329240f7dc9b19f435b5eb613169cd22da 100644
|
| --- a/chrome/browser/history/history.cc
|
| +++ b/chrome/browser/history/history.cc
|
| @@ -491,58 +491,62 @@ HistoryService::Handle HistoryService::GetPageThumbnail(
|
| new history::GetPageThumbnailRequest(callback), page_url);
|
| }
|
|
|
| -void HistoryService::GetFavicon(FaviconService::GetFaviconRequest* request,
|
| - const GURL& icon_url,
|
| - history::IconType icon_type) {
|
| - Schedule(PRIORITY_NORMAL, &HistoryBackend::GetFavicon, NULL, request,
|
| - icon_url, icon_type);
|
| -}
|
| -
|
| -void HistoryService::UpdateFaviconMappingAndFetch(
|
| +void HistoryService::GetFavicons(
|
| FaviconService::GetFaviconRequest* request,
|
| - const GURL& page_url,
|
| - const GURL& icon_url,
|
| + const std::vector<GURL>& icon_urls,
|
| history::IconType icon_type) {
|
| - Schedule(PRIORITY_NORMAL, &HistoryBackend::UpdateFaviconMappingAndFetch, NULL,
|
| - request, page_url, icon_url, history::FAVICON);
|
| + Schedule(PRIORITY_NORMAL, &HistoryBackend::GetFavicons, NULL, request,
|
| + icon_urls, icon_type);
|
| }
|
|
|
| -void HistoryService::GetFaviconForURL(
|
| +void HistoryService::GetFaviconsForURL(
|
| FaviconService::GetFaviconRequest* request,
|
| const GURL& page_url,
|
| int icon_types) {
|
| - Schedule(PRIORITY_NORMAL, &HistoryBackend::GetFaviconForURL, NULL, request,
|
| + Schedule(PRIORITY_NORMAL, &HistoryBackend::GetFaviconsForURL, NULL, request,
|
| page_url, icon_types);
|
| }
|
|
|
| -void HistoryService::GetFaviconForID(FaviconService::GetFaviconRequest* request,
|
| - history::FaviconID id) {
|
| - Schedule(PRIORITY_NORMAL, &HistoryBackend::GetFaviconForID, NULL, request,
|
| - id);
|
| +void HistoryService::UpdateFaviconMappingsAndFetch(
|
| + FaviconService::GetFaviconRequest* request,
|
| + const GURL& page_url,
|
| + const std::vector<GURL>& icon_urls,
|
| + history::IconType icon_type) {
|
| + Schedule(PRIORITY_NORMAL, &HistoryBackend::UpdateFaviconMappingsAndFetch,
|
| + NULL, request, page_url, icon_urls, icon_type);
|
| }
|
|
|
| -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,
|
| + history::IconType icon_type,
|
| + const std::vector<history::FaviconDataElement>& elements) {
|
| + if (!CanAddURL(page_url))
|
| + return;
|
| +
|
| + ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::AddFavicons, page_url,
|
| + icon_type, elements);
|
| +}
|
| +
|
| +void HistoryService::SetFavicons(
|
| + const GURL& page_url,
|
| + history::IconType icon_type,
|
| + const std::vector<history::FaviconDataElement>& elements,
|
| + 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_type, elements, 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);
|
| }
|
|
|
|
|