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

Unified Diff: chrome/browser/win/jumplist.cc

Issue 2936053002: Use JumpList icon caches to remove redundant favicon loading (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into usecachetosaveiconfetch Created 3 years, 6 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/win/jumplist.cc
diff --git a/chrome/browser/win/jumplist.cc b/chrome/browser/win/jumplist.cc
index 35f07fcb3a16bcf290967f371b634c3bfb7a0c49..bbca037062d132ddc5c693646170827aee422cee 100644
--- a/chrome/browser/win/jumplist.cc
+++ b/chrome/browser/win/jumplist.cc
@@ -431,7 +431,8 @@ void JumpList::OnMostVisitedURLsAvailable(
link->set_title(!url.title.empty() ? url.title : url_string_wide);
link->set_url(url_string);
most_visited_pages_.push_back(link);
- icon_urls_.emplace_back(std::move(url_string), std::move(link));
+ if (most_visited_icons_.find(url_string) == most_visited_icons_.end())
+ icon_urls_.emplace_back(std::move(url_string), std::move(link));
}
most_visited_should_update_ = true;
@@ -459,7 +460,8 @@ bool JumpList::AddTab(const sessions::TabRestoreService::Tab& tab,
link->set_title(current_navigation.title());
link->set_url(url);
recently_closed_pages_.push_back(link);
- icon_urls_.emplace_back(std::move(url), std::move(link));
+ if (recently_closed_icons_.find(url) == recently_closed_icons_.end())
+ icon_urls_.emplace_back(std::move(url), std::move(link));
return true;
}
« 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