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

Side by Side Diff: ios/chrome/browser/ntp_tiles/ios_most_visited_sites_factory.cc

Issue 2388783004: Ensure PopularSite icon availability in ntp_tiles. (Closed)
Patch Set: Merge branch 'master' into icons Created 4 years, 1 month 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
« no previous file with comments | « components/ntp_tiles/popular_sites.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ios/chrome/browser/ntp_tiles/ios_most_visited_sites_factory.h" 5 #include "ios/chrome/browser/ntp_tiles/ios_most_visited_sites_factory.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "components/history/core/browser/top_sites.h" 8 #include "components/history/core/browser/top_sites.h"
9 #include "components/image_fetcher/image_fetcher_impl.h"
10 #include "components/keyed_service/core/service_access_type.h"
11 #include "components/ntp_tiles/icon_cacher.h"
9 #include "components/ntp_tiles/most_visited_sites.h" 12 #include "components/ntp_tiles/most_visited_sites.h"
10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 13 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
14 #include "ios/chrome/browser/favicon/favicon_service_factory.h"
11 #include "ios/chrome/browser/history/top_sites_factory.h" 15 #include "ios/chrome/browser/history/top_sites_factory.h"
12 #include "ios/chrome/browser/ntp_tiles/ios_popular_sites_factory.h" 16 #include "ios/chrome/browser/ntp_tiles/ios_popular_sites_factory.h"
17 #include "ios/chrome/browser/suggestions/ios_image_decoder_impl.h"
13 #include "ios/chrome/browser/suggestions/suggestions_service_factory.h" 18 #include "ios/chrome/browser/suggestions/suggestions_service_factory.h"
19 #include "ios/web/public/web_thread.h"
14 20
15 std::unique_ptr<ntp_tiles::MostVisitedSites> 21 std::unique_ptr<ntp_tiles::MostVisitedSites>
16 IOSMostVisitedSitesFactory::NewForBrowserState( 22 IOSMostVisitedSitesFactory::NewForBrowserState(
17 ios::ChromeBrowserState* browser_state) { 23 ios::ChromeBrowserState* browser_state) {
24 scoped_refptr<base::SequencedTaskRunner> task_runner =
25 web::WebThread::GetBlockingPool()
26 ->GetSequencedTaskRunnerWithShutdownBehavior(
27 base::SequencedWorkerPool::GetSequenceToken(),
28 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN);
18 return base::MakeUnique<ntp_tiles::MostVisitedSites>( 29 return base::MakeUnique<ntp_tiles::MostVisitedSites>(
19 browser_state->GetPrefs(), 30 browser_state->GetPrefs(),
20 ios::TopSitesFactory::GetForBrowserState(browser_state), 31 ios::TopSitesFactory::GetForBrowserState(browser_state),
21 suggestions::SuggestionsServiceFactory::GetForBrowserState(browser_state), 32 suggestions::SuggestionsServiceFactory::GetForBrowserState(browser_state),
22 IOSPopularSitesFactory::NewForBrowserState(browser_state), nil); 33 IOSPopularSitesFactory::NewForBrowserState(browser_state),
34 base::MakeUnique<ntp_tiles::IconCacher>(
35 ios::FaviconServiceFactory::GetForBrowserState(
36 browser_state, ServiceAccessType::IMPLICIT_ACCESS),
37 base::MakeUnique<image_fetcher::ImageFetcherImpl>(
38 suggestions::CreateIOSImageDecoder(task_runner),
39 browser_state->GetRequestContext())),
40 nil);
23 } 41 }
OLDNEW
« no previous file with comments | « components/ntp_tiles/popular_sites.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698