summaryrefslogtreecommitdiffstats
path: root/android_webview/browser
diff options
context:
space:
mode:
authorqsr@chromium.org <qsr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 03:34:36 +0000
committerqsr@chromium.org <qsr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 03:34:36 +0000
commit836db307a417dfbff23e3b21d61183fd02bb2c10 (patch)
tree5d4989513ff3cdf0b790e071e59334616304c185 /android_webview/browser
parentf412499172123a64164926a2482e81151892b44d (diff)
downloadchromium_src-836db307a417dfbff23e3b21d61183fd02bb2c10.zip
chromium_src-836db307a417dfbff23e3b21d61183fd02bb2c10.tar.gz
chromium_src-836db307a417dfbff23e3b21d61183fd02bb2c10.tar.bz2
Resizing huge favicons when retrieving those.
Favicons and touch icons have no reason to ever be larger than 114 pixels. As we need to re-encode those on the browser process, very large favicon have an impact on the CPU used on the browser process. It also means bigger messages passed from a process to the other. This CL add a parameter so that the browser process can specify the maximal size of the images it is interested in, so that the renderer can resize the images if none match the criteria. BUG=248561 Review URL: https://chromiumcodereview.appspot.com/17069002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207303 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/browser')
-rw-r--r--android_webview/browser/icon_helper.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/android_webview/browser/icon_helper.cc b/android_webview/browser/icon_helper.cc
index 7f6c4fb..0ed567b 100644
--- a/android_webview/browser/icon_helper.cc
+++ b/android_webview/browser/icon_helper.cc
@@ -60,8 +60,9 @@ void IconHelper::DidUpdateFaviconURL(int32 page_id,
// (currently that is, the app has called WebIconDatabase.open()
// but we should decouple that setting via a boolean setting)
web_contents()->DownloadImage(i->icon_url,
- true,
- 0,
+ true, // Is a favicon
+ 0, // No preferred size
+ 0, // No maximum size
base::Bind(
&IconHelper::DownloadFaviconCallback, base::Unretained(this)));
break;