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

Side by Side Diff: components/favicon/content/content_favicon_driver.cc

Issue 2891333002: Introduce dedicated enum value for icons from Web Manifests (Closed)
Patch Set: Put browsertest behind #if. 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 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/content/content_favicon_driver.h" 5 #include "components/favicon/content/content_favicon_driver.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "components/favicon/content/favicon_url_util.h" 9 #include "components/favicon/content/favicon_url_util.h"
10 #include "components/favicon/core/favicon_service.h" 10 #include "components/favicon/core/favicon_service.h"
(...skipping 13 matching lines...) Expand all
24 24
25 namespace favicon { 25 namespace favicon {
26 namespace { 26 namespace {
27 27
28 void ExtractManifestIcons( 28 void ExtractManifestIcons(
29 const ContentFaviconDriver::ManifestDownloadCallback& callback, 29 const ContentFaviconDriver::ManifestDownloadCallback& callback,
30 const GURL& manifest_url, 30 const GURL& manifest_url,
31 const content::Manifest& manifest) { 31 const content::Manifest& manifest) {
32 std::vector<FaviconURL> candidates; 32 std::vector<FaviconURL> candidates;
33 for (const content::Manifest::Icon& icon : manifest.icons) { 33 for (const content::Manifest::Icon& icon : manifest.icons) {
34 candidates.emplace_back(icon.src, favicon_base::FAVICON, icon.sizes); 34 candidates.emplace_back(icon.src, favicon_base::WEB_MANIFEST_ICON,
35 icon.sizes);
35 } 36 }
36 callback.Run(candidates); 37 callback.Run(candidates);
37 } 38 }
38 39
39 } // namespace 40 } // namespace
40 41
41 // static 42 // static
42 void ContentFaviconDriver::CreateForWebContents( 43 void ContentFaviconDriver::CreateForWebContents(
43 content::WebContents* web_contents, 44 content::WebContents* web_contents,
44 FaviconService* favicon_service, 45 FaviconService* favicon_service,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // redownloaded. 239 // redownloaded.
239 GURL url = navigation_handle->GetURL(); 240 GURL url = navigation_handle->GetURL();
240 if (url != bypass_cache_page_url_) 241 if (url != bypass_cache_page_url_)
241 bypass_cache_page_url_ = GURL(); 242 bypass_cache_page_url_ = GURL();
242 243
243 // Get the favicon, either from history or request it from the net. 244 // Get the favicon, either from history or request it from the net.
244 FetchFavicon(url); 245 FetchFavicon(url);
245 } 246 }
246 247
247 } // namespace favicon 248 } // namespace favicon
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/search/suggestions/url_suggestion_result.cc ('k') | components/favicon/core/favicon_driver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698