Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 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_POLICY_BROWSER_POLICY_CONTEXT_H_ | |
| 6 #define CHROME_BROWSER_POLICY_BROWSER_POLICY_CONTEXT_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/basictypes.h" | |
| 10 #include "base/scoped_ptr.h" | |
| 11 | |
| 12 class PrefService; | |
| 13 class TokenService; | |
| 14 class URLRequestContextGetter; | |
| 15 | |
| 16 namespace policy { | |
| 17 | |
| 18 class CloudPolicyContext; | |
| 19 class CloudPolicyController; | |
| 20 class ConfigurationPolicyProvider; | |
| 21 | |
| 22 // Manages the lifecycle of browser-global policy infrastructure, such as the | |
| 23 // platform policy providers. | |
| 24 class BrowserPolicyContext { | |
|
danno
2011/02/04 16:01:33
How about s/Context/Custodian/ :-)
Jakob Kummerow
2011/02/14 13:50:34
Done -- as discussed offline, s/Context/Connector/
| |
| 25 public: | |
| 26 BrowserPolicyContext(); | |
| 27 // Constructor for tests that allows tests to use fake platform policy | |
| 28 // providers instead of using the actual ones. | |
| 29 BrowserPolicyContext( | |
|
danno
2011/02/04 16:01:33
protected?
Jakob Kummerow
2011/02/14 13:50:34
Done.
| |
| 30 ConfigurationPolicyProvider* managed_platform_provider, | |
| 31 ConfigurationPolicyProvider* recommended_platform_provider); | |
| 32 ~BrowserPolicyContext(); | |
| 33 | |
| 34 // Activates the cloud policy context. We can't pass these in the constructor | |
| 35 // since the context must start up before threading and net is up. | |
| 36 void Initialize(PrefService* local_state, | |
| 37 URLRequestContextGetter* request_context); | |
| 38 | |
| 39 ConfigurationPolicyProvider* GetManagedPlatformProvider() const; | |
| 40 ConfigurationPolicyProvider* GetManagedCloudProvider() const; | |
| 41 ConfigurationPolicyProvider* GetRecommendedPlatformProvider() const; | |
| 42 ConfigurationPolicyProvider* GetRecommendedCloudProvider() const; | |
| 43 | |
| 44 private: | |
| 45 static ConfigurationPolicyProvider* CreateManagedPlatformProvider(); | |
| 46 static ConfigurationPolicyProvider* CreateRecommendedPlatformProvider(); | |
| 47 | |
| 48 scoped_ptr<ConfigurationPolicyProvider> managed_platform_provider_; | |
| 49 scoped_ptr<ConfigurationPolicyProvider> recommended_platform_provider_; | |
| 50 | |
| 51 scoped_ptr<CloudPolicyController> controller_; | |
| 52 scoped_ptr<CloudPolicyContext> cloud_context_; | |
| 53 | |
| 54 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyContext); | |
| 55 }; | |
| 56 | |
| 57 } // namespace policy | |
| 58 | |
| 59 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONTEXT_H_ | |
| OLD | NEW |