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

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

Issue 226543008: Ensures TopSitesImpl::MergeCachedForcedURLs doesn't keep forced URLs if they are part of the redire… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/top_sites_impl.cc
diff --git a/chrome/browser/history/top_sites_impl.cc b/chrome/browser/history/top_sites_impl.cc
index 298c16b2e2f16de10fe61cd685b3f7e9122e867d..3d45f35f87d275796f2f2a4ca336f0c5763aadcc 100644
--- a/chrome/browser/history/top_sites_impl.cc
+++ b/chrome/browser/history/top_sites_impl.cc
@@ -661,7 +661,9 @@ size_t TopSitesImpl::MergeCachedForcedURLs(MostVisitedURLList* new_list) {
std::set<GURL> all_new_urls;
size_t num_forced = 0;
for (size_t i = 0; i < new_list->size(); ++i) {
- all_new_urls.insert((*new_list)[i].url);
+ for (size_t j = 0; j < (*new_list)[i].redirects.size(); j++) {
+ all_new_urls.insert((*new_list)[i].redirects[j]);
+ }
if (!(*new_list)[i].last_forced_time.is_null())
++num_forced;
}
« no previous file with comments | « no previous file | chrome/browser/history/top_sites_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698