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

Unified Diff: chrome/browser/favicon/favicon_service.h

Issue 10870022: Change FaviconData to be able to return data for multiple bitmaps for same icon URL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
Index: chrome/browser/favicon/favicon_service.h
diff --git a/chrome/browser/favicon/favicon_service.h b/chrome/browser/favicon/favicon_service.h
index d122dd64bda74871cb4e9e8cf22ba3a6be1dfeb4..99dc12c183787e9280b577c768cfdc0e7f4cf17e 100644
--- a/chrome/browser/favicon/favicon_service.h
+++ b/chrome/browser/favicon/favicon_service.h
@@ -27,19 +27,26 @@ class FaviconService : public CancelableRequestProvider {
virtual ~FaviconService();
- // Callback for GetFavicon. If we have previously inquired about the favicon
- // for this URL, |know_favicon| will be true, and the rest of the fields will
- // be valid (otherwise they will be ignored).
- //
- // On |know_favicon| == true, |data| will either contain the PNG encoded
- // favicon data, or it will be NULL to indicate that the site does not have
- // a favicon (in other words, we know the site doesn't have a favicon, as
- // opposed to not knowing anything). |expired| will be set to true if we
- // refreshed the favicon "too long" ago and should be updated if the page
- // is visited again.
+ // Callback for GetFavicon.
+ // If we have previously inquired about the favicon for this URL,
+ // |know_favicon| will be true, and the rest of the fields will be valid
+ // (otherwise they will be ignored).
+ // On |know_favicon| == true, |icon_url| will be set to the URL whose favicon
+ // sizes best match the optimal favicon sizes of 16x16 and 32x32.
+ // See history_types.h for a detailed description of the FaviconData struct.
+ // Third argument:
+ // a) If the callback is called as a result of GetFaviconForURL()
+ // The third argument is a list of the icon URLs of the requested icon type
+ // mapped to the passed in |page_url|.
+ // b) If the callback is called as a result of GetFavicon() or
+ // UpdateFaviconMappingAndFetch()
+ // The third argument has a single entry with the passed in |icon_url| if
+ // it is known to the history backend. Otherwise, an empty vector is
+ // returned.
typedef base::Callback<
sky 2012/08/23 15:50:38 As discussed over IM, this is temporary. Long term
void(Handle, // handle
- history::FaviconData)> // the type of favicon
+ history::FaviconData,
+ std::vector<GURL>)>
FaviconDataCallback;
typedef CancelableRequest<FaviconDataCallback> GetFaviconRequest;
@@ -76,12 +83,6 @@ class FaviconService : public CancelableRequestProvider {
CancelableRequestConsumerBase* consumer,
const FaviconDataCallback& callback);
- // Requests the favicon for |favicon_id|. The |consumer| is notified when the
- // bits have been fetched.
- Handle GetFaviconForID(history::FaviconID favicon_id,
- CancelableRequestConsumerBase* consumer,
- const FaviconDataCallback& callback);
-
// Marks all types of favicon for the page as being out of date.
void SetFaviconOutOfDateForPage(const GURL& page_url);

Powered by Google App Engine
This is Rietveld 408576698