1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "apps/saved_devices_service_factory.h"
7 #include "apps/saved_devices_service.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
14 SavedDevicesService
* SavedDevicesServiceFactory::GetForProfile(
16 return static_cast<SavedDevicesService
*>(
17 GetInstance()->GetServiceForBrowserContext(profile
, true));
21 SavedDevicesServiceFactory
* SavedDevicesServiceFactory::GetInstance() {
22 return Singleton
<SavedDevicesServiceFactory
>::get();
25 SavedDevicesServiceFactory::SavedDevicesServiceFactory()
26 : BrowserContextKeyedServiceFactory(
27 "SavedDevicesService",
28 BrowserContextDependencyManager::GetInstance()) {
31 SavedDevicesServiceFactory::~SavedDevicesServiceFactory() {
34 KeyedService
* SavedDevicesServiceFactory::BuildServiceInstanceFor(
35 content::BrowserContext
* profile
) const {
36 return new SavedDevicesService(static_cast<Profile
*>(profile
));