| OLD | NEW |
| 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 "ios/chrome/browser/ntp_snippets/ios_chrome_ntp_snippets_service_factor
y.h" | 5 #include "ios/chrome/browser/ntp_snippets/ios_chrome_ntp_snippets_service_factor
y.h" |
| 6 | 6 |
| 7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "components/image_fetcher/image_fetcher.h" | 12 #include "components/image_fetcher/image_fetcher.h" |
| 13 #include "components/keyed_service/ios/browser_state_dependency_manager.h" | 13 #include "components/keyed_service/ios/browser_state_dependency_manager.h" |
| 14 #include "components/ntp_snippets/ntp_snippets_fetcher.h" | 14 #include "components/ntp_snippets/ntp_snippets_fetcher.h" |
| 15 #include "components/ntp_snippets/ntp_snippets_service.h" | 15 #include "components/ntp_snippets/ntp_snippets_service.h" |
| 16 #include "components/version_info/version_info.h" | 16 #include "components/version_info/version_info.h" |
| 17 #include "ios/chrome/browser/application_context.h" | 17 #include "ios/chrome/browser/application_context.h" |
| 18 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 18 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 19 #include "ios/chrome/browser/suggestions/image_fetcher_impl.h" | 19 #include "ios/chrome/browser/suggestions/image_fetcher_impl.h" |
| 20 #include "ios/chrome/browser/suggestions/suggestions_service_factory.h" | 20 #include "ios/chrome/browser/suggestions/suggestions_service_factory.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); | 90 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); |
| 91 return base::WrapUnique(new ntp_snippets::NTPSnippetsService( | 91 return base::WrapUnique(new ntp_snippets::NTPSnippetsService( |
| 92 chrome_browser_state->GetPrefs(), suggestions_service, task_runner, | 92 chrome_browser_state->GetPrefs(), suggestions_service, task_runner, |
| 93 GetApplicationContext()->GetApplicationLocale(), scheduler, | 93 GetApplicationContext()->GetApplicationLocale(), scheduler, |
| 94 base::WrapUnique(new ntp_snippets::NTPSnippetsFetcher( | 94 base::WrapUnique(new ntp_snippets::NTPSnippetsFetcher( |
| 95 request_context, base::Bind(&ParseJson), | 95 request_context, base::Bind(&ParseJson), |
| 96 GetChannel() == version_info::Channel::STABLE)), | 96 GetChannel() == version_info::Channel::STABLE)), |
| 97 base::WrapUnique(new ImageFetcherImpl( | 97 base::WrapUnique(new ImageFetcherImpl( |
| 98 request_context.get(), web::WebThread::GetBlockingPool())))); | 98 request_context.get(), web::WebThread::GetBlockingPool())))); |
| 99 } | 99 } |
| OLD | NEW |