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

Unified Diff: chrome/browser/android/thumbnail/thumbnail_store.cc

Issue 1005343004: Update visible ids if any of their thumbnails are invalid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/thumbnail/thumbnail_store.cc
diff --git a/chrome/browser/android/thumbnail/thumbnail_store.cc b/chrome/browser/android/thumbnail/thumbnail_store.cc
index a904303afce0b6fd0070d2cf5bf184fa8b926416..4fe4472172c4aae3f166d3340892e57b08ba9292 100644
--- a/chrome/browser/android/thumbnail/thumbnail_store.cc
+++ b/chrome/browser/android/thumbnail/thumbnail_store.cc
@@ -269,20 +269,20 @@ void ThumbnailStore::UpdateVisibleIds(const TabIdList& priority) {
if (visible_ids_.size() == ids_size) {
// Early out if called with the same input as last time (We only care
// about the first mCache.MaximumCacheSize() entries).
- bool lists_differ = false;
+ bool needs_update = false;
TabIdList::const_iterator visible_iter = visible_ids_.begin();
TabIdList::const_iterator priority_iter = priority.begin();
while (visible_iter != visible_ids_.end() &&
priority_iter != priority.end()) {
- if (*priority_iter != *visible_iter) {
- lists_differ = true;
+ if (*priority_iter != *visible_iter || !cache_.Get(*priority_iter)) {
+ needs_update = true;
break;
}
visible_iter++;
priority_iter++;
}
- if (!lists_differ)
+ if (!needs_update)
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698