Index: chrome/browser/ui/webui/favicon_source.cc |
=================================================================== |
--- chrome/browser/ui/webui/favicon_source.cc (revision 173105) |
+++ chrome/browser/ui/webui/favicon_source.cc (working copy) |
@@ -17,6 +17,8 @@ |
#include "ui/base/layout.h" |
#include "ui/base/resource/resource_bundle.h" |
+const int kMaxIconSize = 256; |
+ |
FaviconSource::FaviconSource(Profile* profile, IconType type) |
: DataSource(type == FAVICON ? chrome::kChromeUIFaviconHost : |
chrome::kChromeUITouchIconHost, |
@@ -84,6 +86,11 @@ |
size_in_dip = atoi(size.c_str()); |
DCHECK(size_in_dip == 64 || size_in_dip == 32 || size_in_dip == 16) << |
Matt Perry
2012/12/14 18:57:08
This DCHECK suggests that we only expect 16, 32, a
|
"only 64x64, 32x32 and 16x16 icons are supported"; |
+ if (size_in_dip > kMaxIconSize) { |
+ // Note that actual size can be more than kMaxIconSize |
+ // because of scale_factor |
+ size_in_dip = kMaxIconSize; |
+ } |
// Optional scale factor. |
if (scale_delimiter != std::string::npos && scale_delimiter < slash) { |
DCHECK(size_in_dip == 16); |