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

Unified Diff: chrome/browser/history/top_sites.h

Issue 6389001: Add heuristics to skip thumbnail generation when it's unnecessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor cleanup Created 9 years, 11 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 | chrome/browser/history/top_sites.cc » ('j') | chrome/common/thumbnail_score.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/top_sites.h
diff --git a/chrome/browser/history/top_sites.h b/chrome/browser/history/top_sites.h
index 00d23432e4336897f24a06871c5cbd103b34ef3f..c3703684add763fd2e3504d696b7dccbe3bcb338 100644
--- a/chrome/browser/history/top_sites.h
+++ b/chrome/browser/history/top_sites.h
@@ -79,6 +79,11 @@ class TopSites
bool GetPageThumbnail(const GURL& url,
scoped_refptr<RefCountedBytes>* bytes);
+ // Get a thumbnail score for a given page. Returns true iff we have the
+ // thumbnail score. This may be invoked on any thread. The score will
+ // be copied to |score|.
+ virtual bool GetPageThumbnailScore(const GURL& url, ThumbnailScore* score);
+
// Invoked from History if migration is needed. If this is invoked it will
// be before HistoryLoaded is invoked.
void MigrateFromHistory();
@@ -144,6 +149,17 @@ class TopSites
bool loaded() const { return loaded_; }
+ // Returns true if the given URL is known to the top sites service.
+ virtual bool IsKnownURL(const GURL& url);
brettw 2011/01/26 05:55:20 Both IsKnownURL and IsFull return false if TopSite
satorux1 2011/01/26 08:14:46 Good idea. Done.
+
+ // Returns true if the top sites list is full (i.e. we already have the
+ // maximu number of top sites).
brettw 2011/01/26 05:55:20 spelling: maximum
satorux1 2011/01/26 08:14:46 Done.
+ virtual bool IsFull();
+
+ protected:
+ // For allowing inheritance.
+ virtual ~TopSites();
+
private:
friend class base::RefCountedThreadSafe<TopSites>;
friend class TopSitesTest;
@@ -177,8 +193,6 @@ class TopSites
TOP_SITES_LOADED
};
- ~TopSites();
-
// Sets the thumbnail without writing to the database. Useful when
// reading last known top sites from the DB.
// Returns true if the thumbnail was set, false if the existing one is better.
« no previous file with comments | « no previous file | chrome/browser/history/top_sites.cc » ('j') | chrome/common/thumbnail_score.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698