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 #ifndef CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_FACTOR Y_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_FACTOR Y_H_ |
6 #define CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_FACTOR Y_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_FACTOR Y_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
12 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" | 12 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" |
13 | 13 |
14 class KeyedService; | 14 class KeyedService; |
15 class Profile; | 15 class Profile; |
16 | 16 |
17 namespace content { | |
18 class BrowserContext; | |
19 } | |
20 | |
17 namespace ownership { | 21 namespace ownership { |
18 class OwnerKeyUtil; | 22 class OwnerKeyUtil; |
19 } | 23 } |
20 | 24 |
21 namespace chromeos { | 25 namespace chromeos { |
22 | 26 |
23 class DeviceSettingsService; | 27 class DeviceSettingsService; |
24 class OwnerSettingsServiceChromeOS; | 28 class OwnerSettingsServiceChromeOS; |
25 | 29 |
26 class OwnerSettingsServiceChromeOSFactory | 30 class OwnerSettingsServiceChromeOSFactory |
27 : public BrowserContextKeyedServiceFactory { | 31 : public BrowserContextKeyedServiceFactory { |
28 public: | 32 public: |
29 static OwnerSettingsServiceChromeOS* GetForProfile(Profile* profile); | 33 static OwnerSettingsServiceChromeOS* GetForProfile(Profile* profile); |
Nikita (slow)
2014/11/19 17:45:59
I suggest dropping this method and always use GetF
ygorshenin1
2014/11/19 18:30:44
Done.
| |
30 | 34 |
35 static OwnerSettingsServiceChromeOS* GetForBrowserContext( | |
36 content::BrowserContext* context); | |
37 | |
31 static OwnerSettingsServiceChromeOSFactory* GetInstance(); | 38 static OwnerSettingsServiceChromeOSFactory* GetInstance(); |
32 | 39 |
33 static void SetDeviceSettingsServiceForTesting( | 40 static void SetDeviceSettingsServiceForTesting( |
34 DeviceSettingsService* device_settings_service); | 41 DeviceSettingsService* device_settings_service); |
35 | 42 |
36 scoped_refptr<ownership::OwnerKeyUtil> GetOwnerKeyUtil(); | 43 scoped_refptr<ownership::OwnerKeyUtil> GetOwnerKeyUtil(); |
37 | 44 |
38 void SetOwnerKeyUtilForTesting( | 45 void SetOwnerKeyUtilForTesting( |
39 const scoped_refptr<ownership::OwnerKeyUtil>& owner_key_util); | 46 const scoped_refptr<ownership::OwnerKeyUtil>& owner_key_util); |
40 | 47 |
(...skipping 13 matching lines...) Expand all Loading... | |
54 content::BrowserContext* browser_context) const override; | 61 content::BrowserContext* browser_context) const override; |
55 | 62 |
56 scoped_refptr<ownership::OwnerKeyUtil> owner_key_util_; | 63 scoped_refptr<ownership::OwnerKeyUtil> owner_key_util_; |
57 | 64 |
58 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsServiceChromeOSFactory); | 65 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsServiceChromeOSFactory); |
59 }; | 66 }; |
60 | 67 |
61 } // namespace chromeos | 68 } // namespace chromeos |
62 | 69 |
63 #endif // CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_FAC TORY_H_ | 70 #endif // CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_FAC TORY_H_ |
OLD | NEW |