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

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

Issue 53283004: Adding support for forced URLs to TopSites. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed GetAllMostVisited. Created 7 years, 1 month 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
Index: chrome/browser/history/top_sites_database.cc
diff --git a/chrome/browser/history/top_sites_database.cc b/chrome/browser/history/top_sites_database.cc
index db9156d4ea06c5d73abf992872868a401d7749a5..e86c07f073e7f7a8d5de0398f200d47f6b28dc3a 100644
--- a/chrome/browser/history/top_sites_database.cc
+++ b/chrome/browser/history/top_sites_database.cc
@@ -312,6 +312,9 @@ void TopSitesDatabase::UpdatePageRank(const MostVisitedURL& url,
void TopSitesDatabase::UpdatePageRankNoTransaction(
const MostVisitedURL& url, int new_rank) {
DCHECK_GT(db_->transaction_nesting(), 0);
+ DCHECK((url.last_forced_time.is_null()) == (new_rank != kRankOfForcedURL))
+ << "Thumbnail without a forced time stamp has a forced rank, or the "
+ << "opposite.";
int prev_rank = GetURLRank(url);
if (prev_rank == kRankOfNonExistingURL) {
« no previous file with comments | « chrome/browser/history/top_sites_cache_unittest.cc ('k') | chrome/browser/history/top_sites_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698