| 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/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 scheduler = NTPSnippetsLauncher::Get(); | 61 scheduler = NTPSnippetsLauncher::Get(); |
| 62 #endif // OS_ANDROID | 62 #endif // OS_ANDROID |
| 63 | 63 |
| 64 scoped_refptr<base::SequencedTaskRunner> task_runner = | 64 scoped_refptr<base::SequencedTaskRunner> task_runner = |
| 65 BrowserThread::GetBlockingPool() | 65 BrowserThread::GetBlockingPool() |
| 66 ->GetSequencedTaskRunnerWithShutdownBehavior( | 66 ->GetSequencedTaskRunnerWithShutdownBehavior( |
| 67 base::SequencedWorkerPool::GetSequenceToken(), | 67 base::SequencedWorkerPool::GetSequenceToken(), |
| 68 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); | 68 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); |
| 69 | 69 |
| 70 return new ntp_snippets::NTPSnippetsService( | 70 return new ntp_snippets::NTPSnippetsService( |
| 71 task_runner, g_browser_process->GetApplicationLocale(), scheduler, | 71 profile->GetPrefs(), task_runner, |
| 72 g_browser_process->GetApplicationLocale(), scheduler, |
| 72 make_scoped_ptr(new ntp_snippets::NTPSnippetsFetcher( | 73 make_scoped_ptr(new ntp_snippets::NTPSnippetsFetcher( |
| 73 task_runner, signin_manager, token_service, request_context, | 74 task_runner, signin_manager, token_service, request_context, |
| 74 profile->GetPath()))); | 75 profile->GetPath()))); |
| 75 } | 76 } |
| OLD | NEW |