Index: chrome/browser/tab_contents/thumbnail_generator.cc |
diff --git a/chrome/browser/tab_contents/thumbnail_generator.cc b/chrome/browser/tab_contents/thumbnail_generator.cc |
index 6acae584d0b1ad475803379470fa797730581c04..ac02e1f59d01236db5bd012cace4033ebb884fb5 100644 |
--- a/chrome/browser/tab_contents/thumbnail_generator.cc |
+++ b/chrome/browser/tab_contents/thumbnail_generator.cc |
@@ -671,13 +671,13 @@ bool ThumbnailGenerator::ShouldUpdateThumbnail(Profile* profile, |
if (!HistoryService::CanAddURL(url)) |
return false; |
// Skip if the top sites list is full, and the URL is not known. |
- const bool is_known = top_sites->IsKnownURL(url); |
- if (top_sites->IsFull() && !is_known) |
+ if (top_sites->IsFull() && !top_sites->IsKnownURL(url)) |
return false; |
- // Skip if we don't have to udpate the existing thumbnail. |
+ // Skip if we don't have to udpate the existing thumbnail. Note that an |
+ // unknown URL can have a thumbnail score. This can happen if a |
+ // thumbnail is set but not yet saved. |
ThumbnailScore current_score; |
- if (is_known && |
- top_sites->GetPageThumbnailScore(url, ¤t_score) && |
+ if (top_sites->GetPageThumbnailScore(url, ¤t_score) && |
!current_score.ShouldConsiderUpdating()) |
return false; |