Index: chrome/browser/ui/metro_pin_tab_helper_win.cc |
diff --git a/chrome/browser/ui/metro_pin_tab_helper_win.cc b/chrome/browser/ui/metro_pin_tab_helper_win.cc |
index bd4ec8dd7dc5f34739678b594f79e8ebd40dce9a..4eede1cc3ec5eba73bcfffd865dead5aae65589a 100644 |
--- a/chrome/browser/ui/metro_pin_tab_helper_win.cc |
+++ b/chrome/browser/ui/metro_pin_tab_helper_win.cc |
@@ -17,12 +17,10 @@ |
#include "base/string_number_conversions.h" |
#include "base/utf_string_conversions.h" |
#include "base/win/metro.h" |
-#include "chrome/browser/favicon/favicon_download_helper.h" |
#include "chrome/browser/favicon/favicon_tab_helper.h" |
#include "chrome/browser/favicon/favicon_util.h" |
#include "chrome/browser/ui/tab_contents/tab_contents.h" |
#include "chrome/common/chrome_paths.h" |
-#include "chrome/common/icon_messages.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/web_contents.h" |
#include "crypto/sha2.h" |
@@ -350,9 +348,7 @@ void MetroPinTabHelper::FaviconChooser::AddPendingRequest(int request_id) { |
} |
MetroPinTabHelper::MetroPinTabHelper(content::WebContents* web_contents) |
- : content::WebContentsObserver(web_contents), |
- ALLOW_THIS_IN_INITIALIZER_LIST( |
- favicon_download_helper_(web_contents, this)) { |
+ : content::WebContentsObserver(web_contents) { |
} |
MetroPinTabHelper::~MetroPinTabHelper() {} |
@@ -406,7 +402,9 @@ void MetroPinTabHelper::TogglePinnedToStartScreen() { |
iter != favicon_url_candidates_.end(); |
++iter) { |
favicon_chooser_->AddPendingRequest( |
- favicon_download_helper_.DownloadFavicon(iter->icon_url, image_size)); |
+ web_contents()->DownloadFavicon(iter->icon_url, image_size, |
+ base::Bind(&MetroPinTabHelper::DidDownloadFavicon, |
+ base::Unretained(this)))); |
} |
} |
@@ -422,13 +420,13 @@ void MetroPinTabHelper::DidNavigateMainFrame( |
favicon_url_candidates_.clear(); |
} |
-void MetroPinTabHelper::OnUpdateFaviconURL( |
+void MetroPinTabHelper::DidUpdateFaviconURL( |
int32 page_id, |
const std::vector<FaviconURL>& candidates) { |
favicon_url_candidates_ = candidates; |
} |
-void MetroPinTabHelper::OnDidDownloadFavicon( |
+void MetroPinTabHelper::DidDownloadFavicon( |
int id, |
const GURL& image_url, |
bool errored, |