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..ed914dfe5baed2895a28439254a08f114b83f4ec 100644 |
--- a/chrome/browser/tab_contents/thumbnail_generator.cc |
+++ b/chrome/browser/tab_contents/thumbnail_generator.cc |
@@ -671,15 +671,19 @@ 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. |
ThumbnailScore current_score; |
- if (is_known && |
- top_sites->GetPageThumbnailScore(url, ¤t_score) && |
+ if (top_sites->GetTemporaryPageThumbnailScore(url, ¤t_score) && |
sky
2011/04/11 15:24:03
Shouldn't this remain as GetPageThumbnailScore?
satorux1
2011/04/11 15:31:46
Good catch! Fixed. My brain doesn't seem to be wor
|
!current_score.ShouldConsiderUpdating()) |
return false; |
+ // Skip if we don't have to udpate the temporary thumbnail (i.e. the one |
+ // not yet saved). |
+ ThumbnailScore temporary_score; |
+ if (top_sites->GetTemporaryPageThumbnailScore(url, &temporary_score) && |
+ !temporary_score.ShouldConsiderUpdating()) |
+ return false; |
return true; |
} |