RemoveFromReadQueue(tab_id);
}
-Thumbnail* ThumbnailStore::Get(TabId tab_id, bool force_disk_read) {
+Thumbnail* ThumbnailStore::Get(TabId tab_id,
+ bool force_disk_read,
+ bool allow_approximation) {
Thumbnail* thumbnail = cache_.Get(tab_id);
if (thumbnail) {
thumbnail->CreateUIResource();
ReadNextThumbnail();
}
- thumbnail = approximation_cache_.Get(tab_id);
- if (thumbnail) {
- thumbnail->CreateUIResource();
- return thumbnail;
+ if (allow_approximation) {
+ thumbnail = approximation_cache_.Get(tab_id);
+ if (thumbnail) {
+ thumbnail->CreateUIResource();
+ return thumbnail;
+ }
}
return NULL;