| 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 "chrome/browser/ntp_snippets/ntp_snippets_service_factory.h" | 5 #include "chrome/browser/ntp_snippets/ntp_snippets_service_factory.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "chrome/browser/android/ntp_snippets_launcher.h" |
| 9 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 12 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 12 #include "chrome/browser/signin/signin_manager_factory.h" | 13 #include "chrome/browser/signin/signin_manager_factory.h" |
| 13 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 14 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 14 #include "components/ntp_snippets/ntp_snippets_fetcher.h" | 15 #include "components/ntp_snippets/ntp_snippets_fetcher.h" |
| 15 #include "components/ntp_snippets/ntp_snippets_service.h" | 16 #include "components/ntp_snippets/ntp_snippets_service.h" |
| 16 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 17 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 17 #include "content/public/browser/browser_context.h" | 18 #include "content/public/browser/browser_context.h" |
| 18 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 49 scoped_refptr<net::URLRequestContextGetter> request_context = | 50 scoped_refptr<net::URLRequestContextGetter> request_context = |
| 50 context->GetRequestContext(); | 51 context->GetRequestContext(); |
| 51 | 52 |
| 52 scoped_refptr<base::SequencedTaskRunner> task_runner = | 53 scoped_refptr<base::SequencedTaskRunner> task_runner = |
| 53 BrowserThread::GetBlockingPool() | 54 BrowserThread::GetBlockingPool() |
| 54 ->GetSequencedTaskRunnerWithShutdownBehavior( | 55 ->GetSequencedTaskRunnerWithShutdownBehavior( |
| 55 base::SequencedWorkerPool::GetSequenceToken(), | 56 base::SequencedWorkerPool::GetSequenceToken(), |
| 56 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); | 57 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); |
| 57 return new ntp_snippets::NTPSnippetsService( | 58 return new ntp_snippets::NTPSnippetsService( |
| 58 task_runner, g_browser_process->GetApplicationLocale(), | 59 task_runner, g_browser_process->GetApplicationLocale(), |
| 60 NTPSnippetsLauncher::Get(), |
| 59 make_scoped_ptr(new ntp_snippets::NTPSnippetsFetcher( | 61 make_scoped_ptr(new ntp_snippets::NTPSnippetsFetcher( |
| 60 task_runner, signin_manager, token_service, request_context.get()))); | 62 task_runner, signin_manager, token_service, request_context.get()))); |
| 61 } | 63 } |
| OLD | NEW |