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

Unified Diff: content/renderer/favicon_helper.cc

Issue 12945007: Fix Notifications Icon loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 7 years, 9 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
« no previous file with comments | « content/renderer/favicon_helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/favicon_helper.cc
diff --git a/content/renderer/favicon_helper.cc b/content/renderer/favicon_helper.cc
index 1c00eb5797d24a11eeefbb440bb7ab7f62f1b248..9dd738f3c0763b59647050577832665f9b2ef823 100644
--- a/content/renderer/favicon_helper.cc
+++ b/content/renderer/favicon_helper.cc
@@ -85,6 +85,7 @@ FaviconHelper::~FaviconHelper() {
void FaviconHelper::OnDownloadFavicon(int id,
const GURL& image_url,
+ bool is_favicon,
int image_size) {
std::vector<SkBitmap> result_images;
if (image_url.SchemeIs("data")) {
@@ -92,7 +93,7 @@ void FaviconHelper::OnDownloadFavicon(int id,
if (!data_image.empty())
result_images.push_back(data_image);
} else {
- if (DownloadFavicon(id, image_url, image_size)) {
+ if (DownloadFavicon(id, image_url, is_favicon, image_size)) {
// Will complete asynchronously via FaviconHelper::DidDownloadFavicon
return;
}
@@ -107,14 +108,18 @@ void FaviconHelper::OnDownloadFavicon(int id,
bool FaviconHelper::DownloadFavicon(int id,
const GURL& image_url,
+ bool is_favicon,
int image_size) {
// Make sure webview was not shut down.
if (!render_view()->GetWebView())
return false;
// Create an image resource fetcher and assign it with a call back object.
image_fetchers_.push_back(new MultiResolutionImageResourceFetcher(
- image_url, render_view()->GetWebView()->mainFrame(), id,
- WebURLRequest::TargetIsFavicon,
+ image_url,
+ render_view()->GetWebView()->mainFrame(),
+ id,
+ is_favicon ? WebURLRequest::TargetIsFavicon :
+ WebURLRequest::TargetIsImage,
base::Bind(&FaviconHelper::DidDownloadFavicon,
base::Unretained(this), image_size)));
return true;
« no previous file with comments | « content/renderer/favicon_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698