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

Unified Diff: chrome/browser/favicon/favicon_handler.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/extensions/extension_web_ui.cc ('k') | chrome/browser/favicon/favicon_service.h » ('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 950f2163dee3d1972995b849f06a3bc7c7e88ab4..a2d8916306707e2e838fc8a0f090971aec7b5ba0 100644
--- a/chrome/browser/favicon/favicon_handler.cc
+++ b/chrome/browser/favicon/favicon_handler.cc
@@ -314,7 +314,7 @@ void FaviconHandler::UpdateFavicon(NavigationEntry* entry,
const std::vector<history::FaviconBitmapResult>& favicon_bitmap_results) {
gfx::Image resized_image = FaviconUtil::SelectFaviconFramesFromPNGs(
favicon_bitmap_results,
- ui::GetSupportedScaleFactors(),
+ FaviconUtil::GetFaviconScaleFactors(),
preferred_icon_size());
if (!resized_image.IsEmpty())
UpdateFavicon(entry, &resized_image);
@@ -412,7 +412,8 @@ void FaviconHandler::OnDidDownloadFavicon(
DoUrlAndIconMatch(*current_candidate(), image_url,
i->second.icon_type)) {
float score = 0.0f;
- std::vector<ui::ScaleFactor> scale_factors = ui::GetSupportedScaleFactors();
+ std::vector<ui::ScaleFactor> scale_factors =
+ FaviconUtil::GetFaviconScaleFactors();
gfx::Image image(SelectFaviconFrames(bitmaps, scale_factors, requested_size,
&score));
@@ -471,8 +472,7 @@ void FaviconHandler::UpdateFaviconMappingAndFetch(
std::vector<GURL> icon_urls;
icon_urls.push_back(icon_url);
GetFaviconService()->UpdateFaviconMappingsAndFetch(page_url, icon_urls,
- icon_type, preferred_icon_size(), ui::GetSupportedScaleFactors(),
- consumer, callback);
+ icon_type, preferred_icon_size(), consumer, callback);
}
void FaviconHandler::GetFavicon(
@@ -481,7 +481,7 @@ void FaviconHandler::GetFavicon(
CancelableRequestConsumerBase* consumer,
const FaviconService::FaviconResultsCallback& callback) {
GetFaviconService()->GetFavicon(icon_url, icon_type, preferred_icon_size(),
- ui::GetSupportedScaleFactors(), consumer, callback);
+ consumer, callback);
}
void FaviconHandler::GetFaviconForURL(
@@ -492,7 +492,7 @@ void FaviconHandler::GetFaviconForURL(
GetFaviconService()->GetFaviconForURL(
FaviconService::FaviconForURLParams(profile_, page_url, icon_types,
preferred_icon_size(), consumer),
- ui::GetSupportedScaleFactors(), callback);
+ callback);
}
void FaviconHandler::SetHistoryFavicons(const GURL& page_url,
« no previous file with comments | « chrome/browser/extensions/extension_web_ui.cc ('k') | chrome/browser/favicon/favicon_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698