Index: chrome/browser/android/thumbnail/thumbnail.cc |
diff --git a/chrome/browser/android/thumbnail/thumbnail.cc b/chrome/browser/android/thumbnail/thumbnail.cc |
index f4c9186e7a5c14f68e5ecf76a038ec63d2bd5e0a..ddf1dac0250efee35fcfb4ab177a152df413fb5e 100644 |
--- a/chrome/browser/android/thumbnail/thumbnail.cc |
+++ b/chrome/browser/android/thumbnail/thumbnail.cc |
@@ -55,6 +55,7 @@ Thumbnail::~Thumbnail() { |
void Thumbnail::SetBitmap(const SkBitmap& bitmap) { |
DCHECK(!bitmap.empty()); |
retrieved_ = false; |
+ // TODO(sievers): We really just need to invalidate it here. |
ClearUIResourceId(); |
scaled_content_size_ = |
gfx::ScaleSize(gfx::Size(bitmap.width(), bitmap.height()), 1.f / scale_); |
@@ -67,6 +68,7 @@ void Thumbnail::SetCompressedBitmap(skia::RefPtr<SkPixelRef> compressed_bitmap, |
DCHECK(compressed_bitmap); |
DCHECK(!content_size.IsEmpty()); |
retrieved_ = false; |
+ // TODO(sievers): We really just need to invalidate it here. |
ClearUIResourceId(); |
gfx::Size data_size(compressed_bitmap->info().width(), |
compressed_bitmap->info().height()); |
@@ -94,8 +96,7 @@ cc::UIResourceBitmap Thumbnail::GetBitmap(cc::UIResourceId uid, |
return old_bitmap; |
} |
-void Thumbnail::UIResourceIsInvalid() { |
- ui_resource_id_ = 0; |
+void Thumbnail::OnWasEvicted() { |
if (thumbnail_delegate_) |
thumbnail_delegate_->InvalidateCachedThumbnail(this); |
} |