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

Unified Diff: components/favicon/core/favicon_handler.cc

Issue 2694333002: Fix leaking page visits in incognito mode via bookmarked favicons (Closed)
Patch Set: Rebased Created 3 years, 3 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 | « components/favicon/core/favicon_handler.h ('k') | components/favicon/core/favicon_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/favicon/core/favicon_handler.cc
diff --git a/components/favicon/core/favicon_handler.cc b/components/favicon/core/favicon_handler.cc
index 42b17daa0277b0f39f5f5eb47cbc786583c56a45..460b735c6d995cb1dcced53d13f2ef243be2c623 100644
--- a/components/favicon/core/favicon_handler.cc
+++ b/components/favicon/core/favicon_handler.cc
@@ -289,8 +289,8 @@ void FaviconHandler::SetFavicon(const GURL& icon_url,
// Associate the icon to all URLs in |page_urls_|, which contains page URLs
// within the same site/document that have been considered to reliably share
// the same icon candidates.
- for (const GURL& page_url : page_urls_) {
- if (ShouldSaveFavicon(page_url))
+ if (!delegate_->IsOffTheRecord()) {
+ for (const GURL& page_url : page_urls_)
service_->SetFavicons(page_url, icon_url, icon_type, image);
}
@@ -581,14 +581,6 @@ bool FaviconHandler::HasPendingTasksForTest() {
cancelable_task_tracker_for_candidates_.HasTrackedTasks();
}
-bool FaviconHandler::ShouldSaveFavicon(const GURL& page_url) const {
- if (!delegate_->IsOffTheRecord())
- return true;
-
- // Always save favicon if the page is bookmarked.
- return delegate_->IsBookmarked(page_url);
-}
-
void FaviconHandler::OnFaviconDataForInitialURLFromFaviconService(
const std::vector<favicon_base::FaviconRawBitmapResult>&
favicon_bitmap_results) {
« no previous file with comments | « components/favicon/core/favicon_handler.h ('k') | components/favicon/core/favicon_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698