Index: chrome/browser/history/top_sites_database.h |
diff --git a/chrome/browser/history/top_sites_database.h b/chrome/browser/history/top_sites_database.h |
index 053f03b0585f63ad5cbd1a380ce65e10edff4e17..e1df910c721497d9a6ef459320834408de994138 100644 |
--- a/chrome/browser/history/top_sites_database.h |
+++ b/chrome/browser/history/top_sites_database.h |
@@ -60,6 +60,15 @@ class TopSitesDatabase { |
private: |
FRIEND_TEST_ALL_PREFIXES(TopSitesDatabaseTest, Version1); |
FRIEND_TEST_ALL_PREFIXES(TopSitesDatabaseTest, Version2); |
+ FRIEND_TEST_ALL_PREFIXES(TopSitesDatabaseTest, Version3); |
+ FRIEND_TEST_ALL_PREFIXES(TopSitesDatabaseTest, AddRemoveEditThumbnails); |
+ |
+ // Rank of all URLs that are forced and therefore cannot be automatically |
+ // evicted. |
+ static const int kRankOfForcedURL = -1; |
+ |
+ // Rank used to indicate that a URL is not stored in the database. |
+ static const int kRankOfNonExistingURL = -2; |
// Creates the thumbnail table, returning true if the table already exists |
// or was successfully created. |
@@ -69,6 +78,10 @@ class TopSitesDatabase { |
// upgrade was successful. |
bool UpgradeToVersion2(); |
+ // Upgrades the thumbnail table to version 3, returning true if the |
+ // upgrade was successful. |
+ bool UpgradeToVersion3(); |
+ |
// Adds a new URL to the database. |
void AddPageThumbnail(const MostVisitedURL& url, |
int new_rank, |
@@ -82,12 +95,9 @@ class TopSitesDatabase { |
bool UpdatePageThumbnail(const MostVisitedURL& url, |
const Images& thumbnail); |
- // Returns the URL's current rank or -1 if it is not present. |
+ // Returns |url|'s current rank or kRankOfNonExistingURL if not present. |
int GetURLRank(const MostVisitedURL& url); |
- // Returns the number of URLs (rows) in the database. |
- int GetRowCount(); |
- |
sql::Connection* CreateDB(const base::FilePath& db_name); |
// Encodes redirects into a string. |