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

Side by Side Diff: components/favicon/core/favicon_driver_impl.cc

Issue 2799273002: Add support to process favicons from Web Manifests (Closed)
Patch Set: Added comment. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/favicon/core/favicon_driver_impl.h" 5 #include "components/favicon/core/favicon_driver_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 void FaviconDriverImpl::SetFaviconOutOfDateForPage(const GURL& url, 86 void FaviconDriverImpl::SetFaviconOutOfDateForPage(const GURL& url,
87 bool force_reload) { 87 bool force_reload) {
88 if (favicon_service_) { 88 if (favicon_service_) {
89 favicon_service_->SetFaviconOutOfDateForPage(url); 89 favicon_service_->SetFaviconOutOfDateForPage(url);
90 if (force_reload) 90 if (force_reload)
91 favicon_service_->ClearUnableToDownloadFavicons(); 91 favicon_service_->ClearUnableToDownloadFavicons();
92 } 92 }
93 } 93 }
94 94
95 void FaviconDriverImpl::OnUpdateFaviconURL( 95 void FaviconDriverImpl::OnUpdateCandidates(
96 const GURL& page_url, 96 const GURL& page_url,
97 const std::vector<FaviconURL>& candidates) { 97 const std::vector<FaviconURL>& candidates,
98 DCHECK(!candidates.empty()); 98 const base::Optional<GURL>& manifest_url) {
99 RecordCandidateMetrics(candidates); 99 RecordCandidateMetrics(candidates);
100 favicon_handler_->OnUpdateFaviconURL(page_url, candidates); 100 favicon_handler_->OnUpdateCandidates(page_url, candidates, manifest_url);
101 if (touch_icon_handler_.get()) 101 if (touch_icon_handler_.get()) {
102 touch_icon_handler_->OnUpdateFaviconURL(page_url, candidates); 102 touch_icon_handler_->OnUpdateCandidates(page_url, candidates,
103 base::nullopt);
104 }
103 } 105 }
104 106
105 } // namespace favicon 107 } // namespace favicon
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698