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

Unified Diff: chrome/browser/extensions/extension_install_prompt.cc

Issue 11360233: Ensure that favicons always have 1x representation regardless of whether the platform supports it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/chromeos/login/helper.cc ('k') | chrome/browser/extensions/extension_uninstall_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_install_prompt.cc
diff --git a/chrome/browser/extensions/extension_install_prompt.cc b/chrome/browser/extensions/extension_install_prompt.cc
index f38287f21d1b2d3d0e32bdb0c56c36189ace8c70..5ebf4e32cce3aee14ee57373c00e9e5b3f09ef1e 100644
--- a/chrome/browser/extensions/extension_install_prompt.cc
+++ b/chrome/browser/extensions/extension_install_prompt.cc
@@ -105,26 +105,16 @@ const int kIconSize = 69;
// Returns pixel size under maximal scale factor for the icon whose device
// independent size is |size_in_dip|
int GetSizeForMaxScaleFactor(int size_in_dip) {
- std::vector<ui::ScaleFactor> supported_scale_factors =
- ui::GetSupportedScaleFactors();
- // Scale factors are in ascending order, so the last one is the one we need.
- ui::ScaleFactor max_scale_factor = supported_scale_factors.back();
- float max_scale_factor_scale = ui::GetScaleFactorScale(max_scale_factor);
-
+ float max_scale_factor_scale =
+ ui::GetScaleFactorScale(ui::GetMaxScaleFactor());
return static_cast<int>(size_in_dip * max_scale_factor_scale);
}
// Returns bitmap for the default icon with size equal to the default icon's
// pixel size under maximal supported scale factor.
SkBitmap GetDefaultIconBitmapForMaxScaleFactor(bool is_app) {
- std::vector<ui::ScaleFactor> supported_scale_factors =
- ui::GetSupportedScaleFactors();
- // Scale factors are in ascending order, so the last one is the one we need.
- ui::ScaleFactor max_scale_factor =
- supported_scale_factors[supported_scale_factors.size() - 1];
-
return Extension::GetDefaultIcon(is_app).
- GetRepresentation(max_scale_factor).sk_bitmap();
+ GetRepresentation(ui::GetMaxScaleFactor()).sk_bitmap();
}
// If auto confirm is enabled then posts a task to proceed with or cancel the
« no previous file with comments | « chrome/browser/chromeos/login/helper.cc ('k') | chrome/browser/extensions/extension_uninstall_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698