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

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

Issue 548323003: Non-plafrom-specific part of an OwnerSettingsService is moved to components/ownership/*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes to *.gypi and *.gn files. Created 6 years, 3 months 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_FACTORY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_FACTOR Y_H_
6 #define CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_FACTORY_H_ 6 #define CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_FACTOR Y_H_
7
8 #include <string>
9 7
10 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
11 #include "base/macros.h" 9 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
13 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
14 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" 12 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
15 13
16 class KeyedService; 14 class KeyedService;
17 class Profile; 15 class Profile;
18 16
19 namespace ownership { 17 namespace ownership {
20 class OwnerKeyUtil; 18 class OwnerKeyUtil;
21 } 19 }
22 20
23 namespace chromeos { 21 namespace chromeos {
24 22
25 class OwnerSettingsService; 23 class OwnerSettingsServiceChromeOS;
26 24
27 class OwnerSettingsServiceFactory : public BrowserContextKeyedServiceFactory { 25 class OwnerSettingsServiceChromeOSFactory
26 : public BrowserContextKeyedServiceFactory {
28 public: 27 public:
29 static OwnerSettingsService* GetForProfile(Profile* profile); 28 static OwnerSettingsServiceChromeOS* GetForProfile(Profile* profile);
30 29
31 static OwnerSettingsServiceFactory* GetInstance(); 30 static OwnerSettingsServiceChromeOSFactory* GetInstance();
32 31
33 scoped_refptr<ownership::OwnerKeyUtil> GetOwnerKeyUtil(); 32 scoped_refptr<ownership::OwnerKeyUtil> GetOwnerKeyUtil();
34 33
35 void SetOwnerKeyUtilForTesting( 34 void SetOwnerKeyUtilForTesting(
36 const scoped_refptr<ownership::OwnerKeyUtil>& owner_key_util); 35 const scoped_refptr<ownership::OwnerKeyUtil>& owner_key_util);
37 36
38 private: 37 private:
39 friend struct DefaultSingletonTraits<OwnerSettingsServiceFactory>; 38 friend struct DefaultSingletonTraits<OwnerSettingsServiceChromeOSFactory>;
40 39
41 OwnerSettingsServiceFactory(); 40 OwnerSettingsServiceChromeOSFactory();
42 virtual ~OwnerSettingsServiceFactory(); 41 virtual ~OwnerSettingsServiceChromeOSFactory();
43 42
44 static KeyedService* BuildInstanceFor(content::BrowserContext* context); 43 static KeyedService* BuildInstanceFor(content::BrowserContext* context);
45 44
46 // BrowserContextKeyedBaseFactory overrides: 45 // BrowserContextKeyedBaseFactory overrides:
47 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE; 46 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
48 47
49 // BrowserContextKeyedServiceFactory implementation: 48 // BrowserContextKeyedServiceFactory implementation:
50 virtual KeyedService* BuildServiceInstanceFor( 49 virtual KeyedService* BuildServiceInstanceFor(
51 content::BrowserContext* browser_context) const OVERRIDE; 50 content::BrowserContext* browser_context) const OVERRIDE;
52 51
53 scoped_refptr<ownership::OwnerKeyUtil> owner_key_util_; 52 scoped_refptr<ownership::OwnerKeyUtil> owner_key_util_;
54 53
55 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsServiceFactory); 54 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsServiceChromeOSFactory);
56 }; 55 };
57 56
58 } // namespace chromeos 57 } // namespace chromeos
59 58
60 #endif // CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_FACTORY_H_ 59 #endif // CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_FAC TORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698