Chromium Code Reviews| 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..3ea880d3caeff053e6df87e5278cb09e79e1b489 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,10 @@ |
| using content::WebContents; |
| +namespace { |
| + static int current_download_id = 0; |
| +} // namespace. |
|
stevenjb
2012/11/26 18:21:58
nit: extra space before // (or omit comment for sh
Cait (Slow)
2012/11/26 23:37:19
Done.
|
| + |
| FaviconDownloadHelper::FaviconDownloadHelper( |
| WebContents* web_contents, |
| FaviconDownloadHelperDelegate* delegate) |
| @@ -26,7 +29,9 @@ 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 = ++current_download_id; |
| + host->Send(new IconMsg_DownloadFavicon(host->GetRoutingID(), id, url, |
| + image_size)); |
| DownloadIdList::iterator i = |
| std::find(download_ids_.begin(), download_ids_.end(), id); |
| DCHECK(i == download_ids_.end()); |