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

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

Issue 565293003: Revert of 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: 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
(Empty)
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.
4
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_
7
8 #include "base/compiler_specific.h"
9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/singleton.h"
12 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
13
14 class KeyedService;
15 class Profile;
16
17 namespace ownership {
18 class OwnerKeyUtil;
19 }
20
21 namespace chromeos {
22
23 class OwnerSettingsServiceChromeOS;
24
25 class OwnerSettingsServiceChromeOSFactory
26 : public BrowserContextKeyedServiceFactory {
27 public:
28 static OwnerSettingsServiceChromeOS* GetForProfile(Profile* profile);
29
30 static OwnerSettingsServiceChromeOSFactory* GetInstance();
31
32 scoped_refptr<ownership::OwnerKeyUtil> GetOwnerKeyUtil();
33
34 void SetOwnerKeyUtilForTesting(
35 const scoped_refptr<ownership::OwnerKeyUtil>& owner_key_util);
36
37 private:
38 friend struct DefaultSingletonTraits<OwnerSettingsServiceChromeOSFactory>;
39
40 OwnerSettingsServiceChromeOSFactory();
41 virtual ~OwnerSettingsServiceChromeOSFactory();
42
43 static KeyedService* BuildInstanceFor(content::BrowserContext* context);
44
45 // BrowserContextKeyedBaseFactory overrides:
46 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
47
48 // BrowserContextKeyedServiceFactory implementation:
49 virtual KeyedService* BuildServiceInstanceFor(
50 content::BrowserContext* browser_context) const OVERRIDE;
51
52 scoped_refptr<ownership::OwnerKeyUtil> owner_key_util_;
53
54 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsServiceChromeOSFactory);
55 };
56
57 } // namespace chromeos
58
59 #endif // CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_FAC TORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698