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

Unified Diff: chrome/browser/extensions/extension_web_ui.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
Index: chrome/browser/extensions/extension_web_ui.cc
diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc
index b98641a3665ea2744452843a7f9a952e6115b69c..0c84da6b78da85b82a0d7af9312f264444255457 100644
--- a/chrome/browser/extensions/extension_web_ui.cc
+++ b/chrome/browser/extensions/extension_web_ui.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/extensions/image_loading_tracker.h"
+#include "chrome/browser/favicon/favicon_util.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/profiles/profile.h"
@@ -98,11 +99,12 @@ class ExtensionWebUIImageLoadingTracker : public ImageLoadingTracker::Observer {
void Init() {
if (extension_) {
// Fetch resources for all supported scale factors for which there are
- // resources. Load image reps for all supported scale factors immediately
- // instead of in an as needed fashion to be consistent with how favicons
- // are requested for chrome:// and page URLs.
+ // resources. Load image reps for all supported scale factors (in
+ // addition to 1x) immediately instead of in an as needed fashion to be
+ // consistent with how favicons are requested for chrome:// and page
+ // URLs.
const std::vector<ui::ScaleFactor>& scale_factors =
- ui::GetSupportedScaleFactors();
+ FaviconUtil::GetFaviconScaleFactors();
std::vector<ImageLoadingTracker::ImageRepresentation> info_list;
for (size_t i = 0; i < scale_factors.size(); ++i) {
float scale = ui::GetScaleFactorScale(scale_factors[i]);

Powered by Google App Engine
This is Rietveld 408576698