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

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

Issue 8401026: top sites: allow TopSites to return all 20 cached sites (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: eliminate kTopSitesShown 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/top_sites.cc
diff --git a/chrome/browser/history/top_sites.cc b/chrome/browser/history/top_sites.cc
index f1749af980a1881a763e5638e12a49d08caf27cd..6cc32489e75c6ee5e2ee5c22714e9dc33166ef8d 100644
--- a/chrome/browser/history/top_sites.cc
+++ b/chrome/browser/history/top_sites.cc
@@ -50,7 +50,6 @@ static const size_t kTopSitesNumber = 20;
// temp_images_ for details.
static const size_t kMaxTempTopImages = 8;
-static const size_t kTopSitesShown = 8;
static const int kDaysOfHistory = 90;
// Time from startup to first HistoryService query.
static const int64 kUpdateIntervalSecs = 15;
@@ -733,7 +732,8 @@ void TopSites::ApplyBlacklistAndPinnedURLs(const MostVisitedURLList& urls,
urls_copy.push_back(urls[i]);
}
- for (size_t pinned_index = 0; pinned_index < kTopSitesShown; pinned_index++) {
+ for (size_t pinned_index = 0; pinned_index < kTopSitesNumber;
+ pinned_index++) {
GURL url;
bool found = GetPinnedURLAtIndex(pinned_index, &url);
if (!found)
@@ -756,7 +756,7 @@ void TopSites::ApplyBlacklistAndPinnedURLs(const MostVisitedURLList& urls,
// Add non-pinned URLs in the empty spots.
size_t current_url = 0; // Index into the remaining URLs in urls_copy.
- for (size_t i = 0; i < kTopSitesShown && current_url < urls_copy.size();
+ for (size_t i = 0; i < kTopSitesNumber && current_url < urls_copy.size();
i++) {
if (i == out->size()) {
out->push_back(urls_copy[current_url]);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698