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

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

Issue 1401053002: Make ProcessCurrentUrl() and OnFaviconDataForInitialURLFromFaviconService() share code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@page_changed_under_us
Patch Set: Created 5 years, 2 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 | « no previous file | components/favicon/core/favicon_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/favicon/core/favicon_handler.h
diff --git a/components/favicon/core/favicon_handler.h b/components/favicon/core/favicon_handler.h
index 48f459495450bdbaf246bc0a3a1616b805489ecc..4ca783018154e33c770ed110ce5303360ae2d4e0 100644
--- a/components/favicon/core/favicon_handler.h
+++ b/components/favicon/core/favicon_handler.h
@@ -97,9 +97,9 @@ class FaviconHandler {
void OnUpdateFaviconURL(const GURL& page_url,
const std::vector<favicon::FaviconURL>& candidates);
- // Processes the current image_urls_ entry, requesting the image from the
- // history / download service.
- void ProcessCurrentUrl();
+ // Called when the history request for favicon data mapped to |url_| has
+ // completed and the renderer has told us the icon URLs used by |url_|
+ void OnGotInitialHistoryDataAndIconURLCandidates();
// Message handler for ImageHostMsg_DidDownloadImage. Called when the image
// at |image_url| has been downloaded.
@@ -195,11 +195,11 @@ class FaviconHandler {
void OnFaviconDataForInitialURLFromFaviconService(const std::vector<
favicon_base::FaviconRawBitmapResult>& favicon_bitmap_results);
- // If the favicon has expired, asks the renderer to download the favicon.
- // Otherwise asks history to update the mapping between page url and icon
- // url with a callback to OnFaviconData when done.
- void DownloadFaviconOrAskFaviconService(const GURL& icon_url,
- favicon_base::IconType icon_type);
+ // If the favicon currently mapped to |url_| has expired, downloads the
+ // current candidate favicon from the renderer. Otherwise requests data for
+ // the current favicon from history. If data is requested from history,
+ // OnFaviconData() is called with the history data once it has been retrieved.
+ void DownloadCurrentCandidateOrAskFaviconService();
// See description above class for details.
void OnFaviconData(const std::vector<favicon_base::FaviconRawBitmapResult>&
« no previous file with comments | « no previous file | components/favicon/core/favicon_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698