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

Unified Diff: components/favicon_base/select_favicon_frames.cc

Issue 2739173002: Always select best favicon bitmap (Closed)
Patch Set: Return default value after NOTREACHED. Created 3 years, 9 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 | « components/favicon/core/favicon_handler_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/favicon_base/select_favicon_frames.cc
diff --git a/components/favicon_base/select_favicon_frames.cc b/components/favicon_base/select_favicon_frames.cc
index 82b44baa6f607c6d641784d9a8fc91d6759ad438..8bc63e8d0ec72100dc31358d20c2ae74fe48f857 100644
--- a/components/favicon_base/select_favicon_frames.cc
+++ b/components/favicon_base/select_favicon_frames.cc
@@ -265,6 +265,9 @@ void SelectFaviconFrameIndices(const std::vector<gfx::Size>& frame_pixel_sizes,
GetCandidateIndicesWithBestScores(
frame_pixel_sizes, desired_sizes, match_score, &results);
+ if (!best_indices)
+ return;
+
std::set<size_t> already_added;
for (size_t i = 0; i < results.size(); ++i) {
size_t index = results[i].index;
« no previous file with comments | « components/favicon/core/favicon_handler_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698