OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" | 5 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" | 8 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" |
9 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 9 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
10 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 10 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 : BrowserContextKeyedServiceFactory( | 33 : BrowserContextKeyedServiceFactory( |
34 "OwnerSettingsService", | 34 "OwnerSettingsService", |
35 BrowserContextDependencyManager::GetInstance()) { | 35 BrowserContextDependencyManager::GetInstance()) { |
36 } | 36 } |
37 | 37 |
38 OwnerSettingsServiceChromeOSFactory::~OwnerSettingsServiceChromeOSFactory() { | 38 OwnerSettingsServiceChromeOSFactory::~OwnerSettingsServiceChromeOSFactory() { |
39 } | 39 } |
40 | 40 |
41 // static | 41 // static |
42 OwnerSettingsServiceChromeOS* | 42 OwnerSettingsServiceChromeOS* |
43 OwnerSettingsServiceChromeOSFactory::GetForProfile(Profile* profile) { | 43 OwnerSettingsServiceChromeOSFactory::GetForBrowserContext( |
| 44 content::BrowserContext* context) { |
44 return static_cast<OwnerSettingsServiceChromeOS*>( | 45 return static_cast<OwnerSettingsServiceChromeOS*>( |
45 GetInstance()->GetServiceForBrowserContext(profile, true)); | 46 GetInstance()->GetServiceForBrowserContext(context, true)); |
46 } | 47 } |
47 | 48 |
48 // static | 49 // static |
49 OwnerSettingsServiceChromeOSFactory* | 50 OwnerSettingsServiceChromeOSFactory* |
50 OwnerSettingsServiceChromeOSFactory::GetInstance() { | 51 OwnerSettingsServiceChromeOSFactory::GetInstance() { |
51 return Singleton<OwnerSettingsServiceChromeOSFactory>::get(); | 52 return Singleton<OwnerSettingsServiceChromeOSFactory>::get(); |
52 } | 53 } |
53 | 54 |
54 // static | 55 // static |
55 void OwnerSettingsServiceChromeOSFactory::SetDeviceSettingsServiceForTesting( | 56 void OwnerSettingsServiceChromeOSFactory::SetDeviceSettingsServiceForTesting( |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 const { | 90 const { |
90 return true; | 91 return true; |
91 } | 92 } |
92 | 93 |
93 KeyedService* OwnerSettingsServiceChromeOSFactory::BuildServiceInstanceFor( | 94 KeyedService* OwnerSettingsServiceChromeOSFactory::BuildServiceInstanceFor( |
94 content::BrowserContext* context) const { | 95 content::BrowserContext* context) const { |
95 return BuildInstanceFor(context); | 96 return BuildInstanceFor(context); |
96 } | 97 } |
97 | 98 |
98 } // namespace chromeos | 99 } // namespace chromeos |
OLD | NEW |