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

Unified Diff: chrome/browser/history/top_sites_cache.cc

Issue 8355031: Most Visited: remove over-eager optimization that causes a lot of blank thumbnails (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test and remove unused function Created 9 years, 2 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 | « chrome/browser/history/top_sites_cache.h ('k') | chrome/browser/history/top_sites_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/top_sites_cache.cc
diff --git a/chrome/browser/history/top_sites_cache.cc b/chrome/browser/history/top_sites_cache.cc
index 5312c0a92c26af769ea83fc587008ebbc770bf0c..10ae296995dc088d840f9053296c145393829dd3 100644
--- a/chrome/browser/history/top_sites_cache.cc
+++ b/chrome/browser/history/top_sites_cache.cc
@@ -24,14 +24,6 @@ void TopSitesCache::SetThumbnails(const URLToImagesMap& images) {
images_ = images;
}
-void TopSitesCache::SetPageThumbnail(const GURL& url,
- RefCountedBytes* thumbnail,
- const ThumbnailScore& score) {
- Images& img = images_[GetCanonicalURL(url)];
- img.thumbnail = thumbnail;
- img.thumbnail_score = score;
-}
-
Images* TopSitesCache::GetImage(const GURL& url) {
return &images_[GetCanonicalURL(url)];
}
@@ -75,19 +67,6 @@ size_t TopSitesCache::GetURLIndex(const GURL& url) {
return GetCanonicalURLsIterator(url)->second;
}
-void TopSitesCache::RemoveUnreferencedThumbnails() {
- for (URLToImagesMap::iterator i = images_.begin(); i != images_.end(); ) {
- if (IsKnownURL(i->first)) {
- ++i;
- } else {
- URLToImagesMap::iterator next_i = i;
- ++next_i;
- images_.erase(i);
- i = next_i;
- }
- }
-}
-
void TopSitesCache::GenerateCanonicalURLs() {
canonical_urls_.clear();
for (size_t i = 0; i < top_sites_.size(); i++)
« no previous file with comments | « chrome/browser/history/top_sites_cache.h ('k') | chrome/browser/history/top_sites_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698