@@ -41,13 +41,9 @@ const char kExtensionRemovedError[] =
41
41
42
42
const char kReferrerId [] = " chrome-remove-extension-dialog" ;
43
43
44
- // Returns bitmap for the default icon with size equal to the default icon's
45
- // pixel size under maximal supported scale factor.
46
- SkBitmap GetDefaultIconBitmapForMaxScaleFactor (bool is_app) {
47
- const gfx::ImageSkia& image =
48
- is_app ? util::GetDefaultAppIcon () : util::GetDefaultExtensionIcon ();
49
- return image.GetRepresentation (
50
- gfx::ImageSkia::GetMaxSupportedScale ()).sk_bitmap ();
44
+ // Returns gfx::ImageSkia for the default icon.
45
+ gfx::ImageSkia GetDefaultIconImage (bool is_app) {
46
+ return is_app ? util::GetDefaultAppIcon () : util::GetDefaultExtensionIcon ();
51
47
}
52
48
53
49
} // namespace
@@ -107,13 +103,7 @@ void ExtensionUninstallDialog::ConfirmUninstall(
107
103
108
104
void ExtensionUninstallDialog::SetIcon (const gfx::Image& image) {
109
105
if (image.IsEmpty ()) {
110
- // Let's set default icon bitmap whose size is equal to the default icon's
111
- // pixel size under maximal supported scale factor. If the bitmap is larger
112
- // than the one we need, it will be scaled down by the ui code.
113
- // TODO(tbarzic): We should use IconImage here and load the required bitmap
114
- // lazily.
115
- icon_ = gfx::ImageSkia::CreateFrom1xBitmap (
116
- GetDefaultIconBitmapForMaxScaleFactor (extension_->is_app ()));
106
+ icon_ = GetDefaultIconImage (extension_->is_app ());
117
107
} else {
118
108
icon_ = *image.ToImageSkia ();
119
109
}
0 commit comments