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

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

Issue 2799273002: Add support to process favicons from Web Manifests (Closed)
Patch Set: Browsertest comments addressed. Created 3 years, 7 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_driver_impl.h ('k') | components/favicon/core/favicon_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2c0bfa4bda70281f1a3136934d4975b25b93ce31..545def8f27886a2ff8997d8acd3f54d2f0b2953f 100644
--- a/components/favicon/core/favicon_driver_impl.cc
+++ b/components/favicon/core/favicon_driver_impl.cc
@@ -98,11 +98,18 @@ void FaviconDriverImpl::SetFaviconOutOfDateForPage(const GURL& url,
void FaviconDriverImpl::OnUpdateCandidates(
const GURL& page_url,
- const std::vector<FaviconURL>& candidates) {
- DCHECK(!candidates.empty());
+ const std::vector<FaviconURL>& candidates,
+ const GURL& manifest_url) {
RecordCandidateMetrics(candidates);
- for (const std::unique_ptr<FaviconHandler>& handler : handlers_)
- handler->OnUpdateCandidates(page_url, candidates);
+ for (const std::unique_ptr<FaviconHandler>& handler : handlers_) {
+ // We feed in the Web Manifest URL (if any) to the instance handling type
+ // FAVICON, because those compete which each other (i.e. manifest icons
+ // override inline favicons).
+ handler->OnUpdateCandidates(page_url, candidates,
+ handler->icon_types() & favicon_base::FAVICON
+ ? manifest_url
+ : GURL::EmptyGURL());
+ }
}
} // namespace favicon
« no previous file with comments | « components/favicon/core/favicon_driver_impl.h ('k') | components/favicon/core/favicon_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698