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

Unified Diff: chrome/browser/ui/metro_pin_tab_helper_win.cc

Issue 11411180: move favicon download code from chrome/ into content/ (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
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 6491efa71cfdd04e38b9a93b3559196e82b0f558..a4d84110807ae091c55e9ed55e70f34857f74439 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,8 @@ 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) {
+ web_contents->RegisterFaviconDelegate(this);
}
MetroPinTabHelper::~MetroPinTabHelper() {}
@@ -406,7 +403,7 @@ 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));
}
}
@@ -422,13 +419,13 @@ void MetroPinTabHelper::DidNavigateMainFrame(
favicon_url_candidates_.clear();
}
-void MetroPinTabHelper::OnUpdateFaviconURL(
+void MetroPinTabHelper::UpdateFaviconURL(
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,

Powered by Google App Engine
This is Rietveld 408576698