Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.h

Issue 640063008: Revert of Implemented OwnerSettingsService::Set() method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 ownership { 17 namespace ownership {
18 class OwnerKeyUtil; 18 class OwnerKeyUtil;
19 } 19 }
20 20
21 namespace chromeos { 21 namespace chromeos {
22 22
23 class DeviceSettingsService;
24 class OwnerSettingsServiceChromeOS; 23 class OwnerSettingsServiceChromeOS;
25 24
26 class OwnerSettingsServiceChromeOSFactory 25 class OwnerSettingsServiceChromeOSFactory
27 : public BrowserContextKeyedServiceFactory { 26 : public BrowserContextKeyedServiceFactory {
28 public: 27 public:
29 static OwnerSettingsServiceChromeOS* GetForProfile(Profile* profile); 28 static OwnerSettingsServiceChromeOS* GetForProfile(Profile* profile);
30 29
31 static OwnerSettingsServiceChromeOSFactory* GetInstance(); 30 static OwnerSettingsServiceChromeOSFactory* GetInstance();
32 31
33 static void SetDeviceSettingsServiceForTesting(
34 DeviceSettingsService* device_settings_service);
35
36 scoped_refptr<ownership::OwnerKeyUtil> GetOwnerKeyUtil(); 32 scoped_refptr<ownership::OwnerKeyUtil> GetOwnerKeyUtil();
37 33
38 void SetOwnerKeyUtilForTesting( 34 void SetOwnerKeyUtilForTesting(
39 const scoped_refptr<ownership::OwnerKeyUtil>& owner_key_util); 35 const scoped_refptr<ownership::OwnerKeyUtil>& owner_key_util);
40 36
41 private: 37 private:
42 friend struct DefaultSingletonTraits<OwnerSettingsServiceChromeOSFactory>; 38 friend struct DefaultSingletonTraits<OwnerSettingsServiceChromeOSFactory>;
43 39
44 OwnerSettingsServiceChromeOSFactory(); 40 OwnerSettingsServiceChromeOSFactory();
45 virtual ~OwnerSettingsServiceChromeOSFactory(); 41 virtual ~OwnerSettingsServiceChromeOSFactory();
46 42
47 static KeyedService* BuildInstanceFor(content::BrowserContext* context); 43 static KeyedService* BuildInstanceFor(content::BrowserContext* context);
48 44
49 // BrowserContextKeyedBaseFactory overrides: 45 // BrowserContextKeyedBaseFactory overrides:
50 virtual bool ServiceIsCreatedWithBrowserContext() const override; 46 virtual bool ServiceIsCreatedWithBrowserContext() const override;
51 47
52 // BrowserContextKeyedServiceFactory implementation: 48 // BrowserContextKeyedServiceFactory implementation:
53 virtual KeyedService* BuildServiceInstanceFor( 49 virtual KeyedService* BuildServiceInstanceFor(
54 content::BrowserContext* browser_context) const override; 50 content::BrowserContext* browser_context) const override;
55 51
56 scoped_refptr<ownership::OwnerKeyUtil> owner_key_util_; 52 scoped_refptr<ownership::OwnerKeyUtil> owner_key_util_;
57 53
58 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsServiceChromeOSFactory); 54 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsServiceChromeOSFactory);
59 }; 55 };
60 56
61 } // namespace chromeos 57 } // namespace chromeos
62 58
63 #endif // CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_FAC TORY_H_ 59 #endif // CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_FAC TORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698