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

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: Fix/Extend NetworkConfigurationUpdater unit test. 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 "base/memory/scoped_ptr.h"
11 #include "components/browser_context_keyed_service/browser_context_keyed_service _factory.h"
12
13 template <typename T> struct DefaultSingletonTraits;
14
15 class Profile;
16
17 namespace policy {
18
19 class NetworkPolicyService;
20 class PolicyCertVerifier;
21
22 // Factory to create NetworkPolicyServices.
23 class NetworkPolicyServiceFactory : public BrowserContextKeyedServiceFactory {
24 public:
25 // Returns an existing NetworkPolicyService for |profile|. See
26 // CreateForProfile.
27 static NetworkPolicyService* GetForProfile(Profile* profile);
28
29 // Creates a new NetworkPolicyService and returns the associated
30 // PolicyCertVerifier. Returns NULL if this service isn't allowed for
31 // |profile|, i.e. if NetworkConfigurationUpdater doesn't exists.
Joao da Silva 2013/11/11 12:38:19 *exist
pneubeck (no reviews) 2013/11/12 10:07:53 Done.
32 // This service is created separately for the original profile and the
33 // incognito profile.
34 // Note: NetworkConfigurationUpdater is currently only created for the primary
35 // user's profile.
36 static scoped_ptr<PolicyCertVerifier> CreateForProfile(Profile* profile);
37
38 static NetworkPolicyServiceFactory* GetInstance();
39
40 private:
41 friend struct DefaultSingletonTraits<NetworkPolicyServiceFactory>;
42
43 NetworkPolicyServiceFactory();
44 virtual ~NetworkPolicyServiceFactory();
45
46 // BrowserContextKeyedServiceFactory:
47 virtual BrowserContextKeyedService* BuildServiceInstanceFor(
48 content::BrowserContext* context) const OVERRIDE;
49 virtual void RegisterProfilePrefs(
50 user_prefs::PrefRegistrySyncable* registry) OVERRIDE;
51
52 DISALLOW_COPY_AND_ASSIGN(NetworkPolicyServiceFactory);
53 };
54
55 } // namespace policy
56
57 #endif // CHROME_BROWSER_CHROMEOS_POLICY_NETWORK_POLICY_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698