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

Unified Diff: chrome/browser/favicon/favicon_download_helper.cc

Issue 11421051: Remove FaviconUtil::DownloadFavicon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « chrome/browser/favicon/favicon_download_helper.h ('k') | chrome/browser/favicon/favicon_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/favicon/favicon_download_helper.cc
diff --git a/chrome/browser/favicon/favicon_download_helper.cc b/chrome/browser/favicon/favicon_download_helper.cc
index ce3959fcc417ca4941fc0f1aaaf831269253147c..2b364d6f76b6b1d82cbbe45074b9b230e4bc8110 100644
--- a/chrome/browser/favicon/favicon_download_helper.cc
+++ b/chrome/browser/favicon/favicon_download_helper.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/favicon/favicon_download_helper.h"
#include "chrome/browser/favicon/favicon_download_helper_delegate.h"
-#include "chrome/browser/favicon/favicon_util.h"
#include "chrome/common/icon_messages.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
@@ -13,6 +12,17 @@
using content::WebContents;
+namespace {
+static int StartDownload(content::RenderViewHost* rvh,
+ const GURL& url,
+ int image_size) {
+ static int id = 0;
+ rvh->Send(new IconMsg_DownloadFavicon(rvh->GetRoutingID(), ++id, url,
+ image_size));
+ return id;
+}
+} // namespace.
+
FaviconDownloadHelper::FaviconDownloadHelper(
WebContents* web_contents,
FaviconDownloadHelperDelegate* delegate)
@@ -26,7 +36,7 @@ FaviconDownloadHelper::~FaviconDownloadHelper() {
int FaviconDownloadHelper::DownloadFavicon(const GURL& url, int image_size) {
content::RenderViewHost* host = web_contents()->GetRenderViewHost();
- int id = FaviconUtil::DownloadFavicon(host, url, image_size);
+ int id = StartDownload(host, url, image_size);
DownloadIdList::iterator i =
std::find(download_ids_.begin(), download_ids_.end(), id);
DCHECK(i == download_ids_.end());
« no previous file with comments | « chrome/browser/favicon/favicon_download_helper.h ('k') | chrome/browser/favicon/favicon_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698