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

Unified Diff: chrome/browser/favicon/favicon_handler.cc

Issue 28943004: Download and store large favicon for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable the unittest that is not suitable for Android in Android platform Created 7 years, 2 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 | « chrome/browser/favicon/favicon_handler.h ('k') | chrome/browser/favicon/favicon_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/favicon/favicon_handler.cc
diff --git a/chrome/browser/favicon/favicon_handler.cc b/chrome/browser/favicon/favicon_handler.cc
index 5e1459cb8ed4a18474af2b2b01eb623060c79f37..57575cfcdeaa0cb6260f3936a09eddd410d0d9c0 100644
--- a/chrome/browser/favicon/favicon_handler.cc
+++ b/chrome/browser/favicon/favicon_handler.cc
@@ -32,7 +32,7 @@ namespace {
// Size (along each axis) of a touch icon. This currently corresponds to
// the apple touch icon for iPad.
-const int kTouchIconSize = 72;
+const int kTouchIconSize = 144;
// Returns chrome::IconType the given icon_type corresponds to.
chrome::IconType ToHistoryIconType(FaviconURL::IconType icon_type) {
@@ -47,27 +47,27 @@ chrome::IconType ToHistoryIconType(FaviconURL::IconType icon_type) {
return chrome::INVALID_ICON;
}
NOTREACHED();
- // Shouldn't reach here, just make compiler happy.
return chrome::INVALID_ICON;
}
// Get the maximal icon size in pixels for a icon of type |icon_type| for the
// current platform.
int GetMaximalIconSize(chrome::IconType icon_type) {
- int base_size = 0;
switch (icon_type) {
case chrome::FAVICON:
- base_size = gfx::kFaviconSize;
- break;
+#if defined(OS_ANDROID)
+ return 192;
+#else
+ return gfx::ImageSkia::GetMaxSupportedScale() * gfx::kFaviconSize;
+#endif
case chrome::TOUCH_ICON:
case chrome::TOUCH_PRECOMPOSED_ICON:
- base_size = kTouchIconSize;
- break;
+ return kTouchIconSize;
case chrome::INVALID_ICON:
- base_size = 0;
- break;
+ return 0;
}
- return gfx::ImageSkia::GetMaxSupportedScale() * base_size;
+ NOTREACHED();
+ return 0;
}
bool DoUrlAndIconMatch(const FaviconURL& favicon_url,
« no previous file with comments | « chrome/browser/favicon/favicon_handler.h ('k') | chrome/browser/favicon/favicon_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698