TopSites: Clear thumbnails from the cache when their URLs get removed

We already cleared the thumbnails from persistent storage, but they
remained in the in-memory cache, so they remained accessible (until the
next Chrome restart) even after all browsing data was cleared.

Bug: 758169
Change-Id: Id916d22358430a82e6d5043ac04fa463a32f824f
Reviewed-on: https://chromium-review.googlesource.com/758640
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514861}
void TopSitesImpl::AddTemporaryThumbnail(const GURL& url,
                                         base::RefCountedMemory* thumbnail,
                                         const ThumbnailScore& score) {
  if (temp_images_.size() == kMaxTempTopImages)
    temp_images_.pop_front();

  TempImage image;
  image.first = url;
  image.second.thumbnail = thumbnail;
  image.second.thumbnail_score = score;
  temp_images_.push_back(image);
}

void TopSitesImpl::AddTemporaryThumbnail(const GURL& url,
                                         base::RefCountedMemory* thumbnail,
                                         const ThumbnailScore& score) {
  if (temp_images_.size() == kMaxTempTopImages)
    temp_images_.pop_front();

  TempImage image;
  image.first = url;
  image.second.thumbnail = thumbnail;
  image.second.thumbnail_score = score;
  temp_images_.push_back(image);
}
