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

Unified Diff: components/ntp_tiles/most_visited_sites.cc

Issue 2683583006: [NTPTiles::Cleanup] Fix unused variable. (Closed)
Patch Set: Created 3 years, 10 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: components/ntp_tiles/most_visited_sites.cc
diff --git a/components/ntp_tiles/most_visited_sites.cc b/components/ntp_tiles/most_visited_sites.cc
index f7a90a89b9e6437bcdf979561b522143f1fb8736..7fd24553cd1eca0939dbb88ed90f05d030afd794 100644
--- a/components/ntp_tiles/most_visited_sites.cc
+++ b/components/ntp_tiles/most_visited_sites.cc
@@ -192,10 +192,8 @@ void MostVisitedSites::OnMostVisitedURLsAvailable(
std::min(visited_list.size(), static_cast<size_t>(num_sites_));
for (size_t i = 0; i < num_tiles; ++i) {
const history::MostVisitedURL& visited = visited_list[i];
- if (visited.url.is_empty()) {
- num_tiles = i;
+ if (visited.url.is_empty())
break; // This is the signal that there are no more real visited sites.
- }
if (supervisor_ && supervisor_->IsBlocked(visited.url))
continue;
« 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