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

Side by Side Diff: chrome/browser/chromeos/policy/network_policy_service_factory.h

Issue 24153012: Fix cyclic dependency between ProfilePolicyConnector and PrefService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed another bug for OTRProfile. Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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_POLICY_NETWORK_POLICY_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_NETWORK_POLICY_SERVICE_FACTORY_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "components/browser_context_keyed_service/browser_context_keyed_service _factory.h"
11
12 template <typename T> struct DefaultSingletonTraits;
13
14 class Profile;
15
16 namespace policy {
17
18 class NetworkPolicyService;
19
20 // Factory to create NetworkPolicyServices.
21 class NetworkPolicyServiceFactory : public BrowserContextKeyedServiceFactory {
22 public:
23 // Returns an existing or creates a new NetworkPolicyService for |profile|.
24 // Will return NULL if this service isn't allowed for |profile|, i.e. for
25 // all but the primary user's profile.
26 static NetworkPolicyService* GetForProfile(Profile* profile);
27
28 static NetworkPolicyServiceFactory* GetInstance();
29
30 private:
31 friend struct DefaultSingletonTraits<NetworkPolicyServiceFactory>;
32
33 NetworkPolicyServiceFactory();
34 virtual ~NetworkPolicyServiceFactory();
35
36 // BrowserContextKeyedServiceFactory:
37 virtual content::BrowserContext* GetBrowserContextToUse(
38 content::BrowserContext* context) const OVERRIDE;
39 virtual BrowserContextKeyedService* BuildServiceInstanceFor(
40 content::BrowserContext* context) const OVERRIDE;
41 virtual void RegisterProfilePrefs(
42 user_prefs::PrefRegistrySyncable* registry) OVERRIDE;
43
44 DISALLOW_COPY_AND_ASSIGN(NetworkPolicyServiceFactory);
45 };
46
47 } // namespace policy
48
49 #endif // CHROME_BROWSER_CHROMEOS_POLICY_NETWORK_POLICY_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698