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

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

Issue 2799273002: Add support to process favicons from Web Manifests (Closed)
Patch Set: Addressed comments, improved tests. Created 3 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
Index: components/favicon/core/favicon_driver_impl.cc
diff --git a/components/favicon/core/favicon_driver_impl.cc b/components/favicon/core/favicon_driver_impl.cc
index f77d11b54a51df3495a6708d2d046449acba2c72..6865d8e2b15351f11dd71db7b5ad13a9c5ef90e9 100644
--- a/components/favicon/core/favicon_driver_impl.cc
+++ b/components/favicon/core/favicon_driver_impl.cc
@@ -96,13 +96,17 @@ void FaviconDriverImpl::SetFaviconOutOfDateForPage(const GURL& url,
}
}
-void FaviconDriverImpl::OnUpdateFaviconURL(
+void FaviconDriverImpl::OnUpdateCandidates(
const GURL& page_url,
- const std::vector<FaviconURL>& candidates) {
- DCHECK(!candidates.empty());
+ const std::vector<FaviconURL>& candidates,
+ const base::Optional<GURL>& manifest_url) {
RecordCandidateMetrics(candidates);
- for (const std::unique_ptr<FaviconHandler>& handler : handlers_)
- handler->OnUpdateFaviconURL(page_url, candidates);
+ for (const std::unique_ptr<FaviconHandler>& handler : handlers_) {
+ handler->OnUpdateCandidates(page_url, candidates,
+ handler->icon_types() & favicon_base::FAVICON
+ ? manifest_url
+ : base::nullopt);
+ }
}
} // namespace favicon

Powered by Google App Engine
This is Rietveld 408576698