| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/bookmarks/startup_task_runner_service_factory.h" | 5 #include "chrome/browser/bookmarks/startup_task_runner_service_factory.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "components/bookmarks/browser/startup_task_runner_service.h" | 8 #include "components/bookmarks/browser/startup_task_runner_service.h" |
| 9 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 9 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // static | 21 // static |
| 22 StartupTaskRunnerService* StartupTaskRunnerServiceFactory::GetForProfile( | 22 StartupTaskRunnerService* StartupTaskRunnerServiceFactory::GetForProfile( |
| 23 Profile* profile) { | 23 Profile* profile) { |
| 24 return static_cast<StartupTaskRunnerService*>( | 24 return static_cast<StartupTaskRunnerService*>( |
| 25 GetInstance()->GetServiceForBrowserContext(profile, true)); | 25 GetInstance()->GetServiceForBrowserContext(profile, true)); |
| 26 } | 26 } |
| 27 | 27 |
| 28 // static | 28 // static |
| 29 StartupTaskRunnerServiceFactory* | 29 StartupTaskRunnerServiceFactory* |
| 30 StartupTaskRunnerServiceFactory::GetInstance() { | 30 StartupTaskRunnerServiceFactory::GetInstance() { |
| 31 return Singleton<StartupTaskRunnerServiceFactory>::get(); | 31 return base::Singleton<StartupTaskRunnerServiceFactory>::get(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 KeyedService* StartupTaskRunnerServiceFactory::BuildServiceInstanceFor( | 34 KeyedService* StartupTaskRunnerServiceFactory::BuildServiceInstanceFor( |
| 35 content::BrowserContext* context) const { | 35 content::BrowserContext* context) const { |
| 36 Profile* profile = Profile::FromBrowserContext(context); | 36 Profile* profile = Profile::FromBrowserContext(context); |
| 37 return new StartupTaskRunnerService(profile->GetIOTaskRunner()); | 37 return new StartupTaskRunnerService(profile->GetIOTaskRunner()); |
| 38 } | 38 } |
| OLD | NEW |