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

Unified Diff: chrome/browser/ui/metro_pin_tab_helper_win.cc

Issue 11777009: Remove redundant |errored| member from IconHostMsg_DidDownloadFavicon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/ui/metro_pin_tab_helper_win.h ('k') | chrome/browser/ui/views/ash/balloon_view_ash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/metro_pin_tab_helper_win.cc
diff --git a/chrome/browser/ui/metro_pin_tab_helper_win.cc b/chrome/browser/ui/metro_pin_tab_helper_win.cc
index 2ef0f9eed198003ef742c10d2c5055ed99952763..1d66f30ea9e07963db61331b2a1e8d589703c9ca 100644
--- a/chrome/browser/ui/metro_pin_tab_helper_win.cc
+++ b/chrome/browser/ui/metro_pin_tab_helper_win.cc
@@ -247,7 +247,6 @@ class MetroPinTabHelper::FaviconChooser {
// Update the |best_candidate_| with the newly downloaded favicons provided.
void UpdateCandidate(int id,
const GURL& image_url,
- bool errored,
int requested_size,
const std::vector<SkBitmap>& bitmaps);
@@ -291,7 +290,6 @@ void MetroPinTabHelper::FaviconChooser::UseChosenCandidate() {
void MetroPinTabHelper::FaviconChooser::UpdateCandidate(
int id,
const GURL& image_url,
- bool errored,
int requested_size,
const std::vector<SkBitmap>& bitmaps) {
const int kMaxIconSize = 32;
@@ -306,30 +304,28 @@ void MetroPinTabHelper::FaviconChooser::UpdateCandidate(
in_progress_requests_.erase(iter);
// Process the bitmaps, keeping the one that is best so far.
- if (!errored) {
- for (std::vector<SkBitmap>::const_iterator iter = bitmaps.begin();
- iter != bitmaps.end();
- ++iter) {
-
- // If the new bitmap is too big, ignore it.
- if (iter->height() > kMaxIconSize || iter->width() > kMaxIconSize)
- continue;
-
- // If we don't have a best candidate yet, this is better so just grab it.
- if (best_candidate_.isNull()) {
- best_candidate_ = *gfx::ImageSkia(*iter).DeepCopy().get();
- continue;
- }
-
- // If it is smaller than our best one so far, ignore it.
- if (iter->height() <= best_candidate_.height() ||
- iter->width() <= best_candidate_.width()) {
- continue;
- }
-
- // Othewise it is our new best candidate.
+ for (std::vector<SkBitmap>::const_iterator iter = bitmaps.begin();
+ iter != bitmaps.end();
+ ++iter) {
+
+ // If the new bitmap is too big, ignore it.
+ if (iter->height() > kMaxIconSize || iter->width() > kMaxIconSize)
+ continue;
+
+ // If we don't have a best candidate yet, this is better so just grab it.
+ if (best_candidate_.isNull()) {
best_candidate_ = *gfx::ImageSkia(*iter).DeepCopy().get();
+ continue;
}
+
+ // If it is smaller than our best one so far, ignore it.
+ if (iter->height() <= best_candidate_.height() ||
+ iter->width() <= best_candidate_.width()) {
+ continue;
+ }
+
+ // Othewise it is our new best candidate.
+ best_candidate_ = *gfx::ImageSkia(*iter).DeepCopy().get();
}
// If there are no more outstanding requests, pin the page on the FILE thread.
@@ -430,12 +426,10 @@ void MetroPinTabHelper::DidUpdateFaviconURL(
void MetroPinTabHelper::DidDownloadFavicon(
int id,
const GURL& image_url,
- bool errored,
int requested_size,
const std::vector<SkBitmap>& bitmaps) {
if (favicon_chooser_.get()) {
- favicon_chooser_->UpdateCandidate(id, image_url, errored,
- requested_size, bitmaps);
+ favicon_chooser_->UpdateCandidate(id, image_url, requested_size, bitmaps);
}
}
« no previous file with comments | « chrome/browser/ui/metro_pin_tab_helper_win.h ('k') | chrome/browser/ui/views/ash/balloon_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698