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

Unified Diff: components/favicon/content/content_favicon_driver.cc

Issue 2691933004: Avoid cyclic dependency FaviconHandler<-->FaviconDriverImpl (Closed)
Patch Set: Minor fix. Created 3 years, 10 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: components/favicon/content/content_favicon_driver.cc
diff --git a/components/favicon/content/content_favicon_driver.cc b/components/favicon/content/content_favicon_driver.cc
index a6e5259847c538dd0a7497d8d52f3c70eef1a88a..8ec4d949f144f08bf71e84c7ca22217eee8997d2 100644
--- a/components/favicon/content/content_favicon_driver.cc
+++ b/components/favicon/content/content_favicon_driver.cc
@@ -88,7 +88,9 @@ bool ContentFaviconDriver::FaviconIsValid() const {
return false;
}
-int ContentFaviconDriver::StartDownload(const GURL& url, int max_image_size) {
+int ContentFaviconDriver::DownloadImage(const GURL& url,
+ int max_image_size,
+ ImageDownloadCallback callback) {
pkotwicz 2017/02/22 02:37:53 Nit: Reorder this function to match order in .h fi
mastiz 2017/02/23 21:55:53 Done. This however makes the diff and blame layer
if (WasUnableToDownloadFavicon(url)) {
DVLOG(1) << "Skip Failed FavIcon: " << url;
return 0;
@@ -97,10 +99,8 @@ int ContentFaviconDriver::StartDownload(const GURL& url, int max_image_size) {
bool bypass_cache = (bypass_cache_page_url_ == GetActiveURL());
bypass_cache_page_url_ = GURL();
- return web_contents()->DownloadImage(
- url, true, max_image_size, bypass_cache,
- base::Bind(&FaviconDriverImpl::DidDownloadFavicon,
- base::Unretained(this)));
+ return web_contents()->DownloadImage(url, true, max_image_size, bypass_cache,
+ callback);
}
bool ContentFaviconDriver::IsOffTheRecord() {

Powered by Google App Engine
This is Rietveld 408576698