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

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

Issue 2891333002: Introduce dedicated enum value for icons from Web Manifests (Closed)
Patch Set: Put browsertest behind #if. Created 3 years, 6 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/large_icon_service.h" 5 #include "components/favicon/core/large_icon_service.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 304
305 } // namespace 305 } // namespace
306 306
307 LargeIconService::LargeIconService( 307 LargeIconService::LargeIconService(
308 FaviconService* favicon_service, 308 FaviconService* favicon_service,
309 const scoped_refptr<base::TaskRunner>& background_task_runner, 309 const scoped_refptr<base::TaskRunner>& background_task_runner,
310 std::unique_ptr<image_fetcher::ImageFetcher> image_fetcher) 310 std::unique_ptr<image_fetcher::ImageFetcher> image_fetcher)
311 : favicon_service_(favicon_service), 311 : favicon_service_(favicon_service),
312 background_task_runner_(background_task_runner), 312 background_task_runner_(background_task_runner),
313 image_fetcher_(std::move(image_fetcher)) { 313 image_fetcher_(std::move(image_fetcher)) {
314 large_icon_types_.push_back(favicon_base::IconType::WEB_MANIFEST_ICON);
314 large_icon_types_.push_back(favicon_base::IconType::FAVICON); 315 large_icon_types_.push_back(favicon_base::IconType::FAVICON);
315 large_icon_types_.push_back(favicon_base::IconType::TOUCH_ICON); 316 large_icon_types_.push_back(favicon_base::IconType::TOUCH_ICON);
316 large_icon_types_.push_back(favicon_base::IconType::TOUCH_PRECOMPOSED_ICON); 317 large_icon_types_.push_back(favicon_base::IconType::TOUCH_PRECOMPOSED_ICON);
317 } 318 }
318 319
319 LargeIconService::~LargeIconService() { 320 LargeIconService::~LargeIconService() {
320 } 321 }
321 322
322 base::CancelableTaskTracker::TaskId 323 base::CancelableTaskTracker::TaskId
323 LargeIconService::GetLargeIconOrFallbackStyle( 324 LargeIconService::GetLargeIconOrFallbackStyle(
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 // TODO(beaudoin): For now this is just a wrapper around 418 // TODO(beaudoin): For now this is just a wrapper around
418 // GetLargestRawFaviconForPageURL. Add the logic required to select the best 419 // GetLargestRawFaviconForPageURL. Add the logic required to select the best
419 // possible large icon. Also add logic to fetch-on-demand when the URL of 420 // possible large icon. Also add logic to fetch-on-demand when the URL of
420 // a large icon is known but its bitmap is not available. 421 // a large icon is known but its bitmap is not available.
421 return favicon_service_->GetLargestRawFaviconForPageURL( 422 return favicon_service_->GetLargestRawFaviconForPageURL(
422 page_url, large_icon_types_, min_source_size_in_pixel, 423 page_url, large_icon_types_, min_source_size_in_pixel,
423 base::Bind(&LargeIconWorker::OnIconLookupComplete, worker), tracker); 424 base::Bind(&LargeIconWorker::OnIconLookupComplete, worker), tracker);
424 } 425 }
425 426
426 } // namespace favicon 427 } // namespace favicon
OLDNEW
« no previous file with comments | « components/favicon/core/favicon_handler_unittest.cc ('k') | components/favicon/ios/favicon_url_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698