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

Unified Diff: chrome/browser/favicon/favicon_tab_helper.cc

Issue 10824319: Give SelectFaviconFrames a quality score. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test Created 8 years, 4 months 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/favicon/favicon_handler_unittest.cc ('k') | chrome/browser/favicon/select_favicon_frames.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/favicon/favicon_tab_helper.cc
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index 649527224d2320742a7ed224d7447cb3d0478778..be89f38ea203e1d6658d7468edae9b50b70b54e9 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -195,6 +195,7 @@ void FaviconTabHelper::OnDidDownloadFavicon(
bool errored,
int requested_size,
const std::vector<SkBitmap>& bitmaps) {
+ float score;
sky 2012/08/16 00:26:20 Can you set this to 0 here jsut to be sure.
// TODO: Possibly do bitmap selection in FaviconHandler, so that it can score
// favicons better.
std::vector<ui::ScaleFactor> scale_factors;
@@ -203,9 +204,12 @@ void FaviconTabHelper::OnDidDownloadFavicon(
#else
scale_factors.push_back(ui::SCALE_FACTOR_100P); // TODO: Aura?
#endif
- gfx::Image favicon(
- SelectFaviconFrames(bitmaps, scale_factors, requested_size));
- favicon_handler_->OnDidDownloadFavicon(id, image_url, errored, favicon);
- if (touch_icon_handler_.get())
- touch_icon_handler_->OnDidDownloadFavicon(id, image_url, errored, favicon);
+ gfx::Image favicon(SelectFaviconFrames(
+ bitmaps, scale_factors, requested_size, &score));
+ favicon_handler_->OnDidDownloadFavicon(
+ id, image_url, errored, favicon, score);
+ if (touch_icon_handler_.get()) {
+ touch_icon_handler_->OnDidDownloadFavicon(
+ id, image_url, errored, favicon, score);
+ }
}
« no previous file with comments | « chrome/browser/favicon/favicon_handler_unittest.cc ('k') | chrome/browser/favicon/select_favicon_frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698