Chromium Code Reviews| Index: chrome/browser/policy/browser_policy_context.h |
| diff --git a/chrome/browser/policy/browser_policy_context.h b/chrome/browser/policy/browser_policy_context.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..eb0d6fba376be865a027fa034a5dc5a9e0f21970 |
| --- /dev/null |
| +++ b/chrome/browser/policy/browser_policy_context.h |
| @@ -0,0 +1,59 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_POLICY_BROWSER_POLICY_CONTEXT_H_ |
| +#define CHROME_BROWSER_POLICY_BROWSER_POLICY_CONTEXT_H_ |
| +#pragma once |
| + |
| +#include "base/basictypes.h" |
| +#include "base/scoped_ptr.h" |
| + |
| +class PrefService; |
| +class TokenService; |
| +class URLRequestContextGetter; |
| + |
| +namespace policy { |
| + |
| +class CloudPolicyContext; |
| +class CloudPolicyController; |
| +class ConfigurationPolicyProvider; |
| + |
| +// Manages the lifecycle of browser-global policy infrastructure, such as the |
| +// platform policy providers. |
| +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/
|
| + public: |
| + BrowserPolicyContext(); |
| + // Constructor for tests that allows tests to use fake platform policy |
| + // providers instead of using the actual ones. |
| + BrowserPolicyContext( |
|
danno
2011/02/04 16:01:33
protected?
Jakob Kummerow
2011/02/14 13:50:34
Done.
|
| + ConfigurationPolicyProvider* managed_platform_provider, |
| + ConfigurationPolicyProvider* recommended_platform_provider); |
| + ~BrowserPolicyContext(); |
| + |
| + // Activates the cloud policy context. We can't pass these in the constructor |
| + // since the context must start up before threading and net is up. |
| + void Initialize(PrefService* local_state, |
| + URLRequestContextGetter* request_context); |
| + |
| + ConfigurationPolicyProvider* GetManagedPlatformProvider() const; |
| + ConfigurationPolicyProvider* GetManagedCloudProvider() const; |
| + ConfigurationPolicyProvider* GetRecommendedPlatformProvider() const; |
| + ConfigurationPolicyProvider* GetRecommendedCloudProvider() const; |
| + |
| + private: |
| + static ConfigurationPolicyProvider* CreateManagedPlatformProvider(); |
| + static ConfigurationPolicyProvider* CreateRecommendedPlatformProvider(); |
| + |
| + scoped_ptr<ConfigurationPolicyProvider> managed_platform_provider_; |
| + scoped_ptr<ConfigurationPolicyProvider> recommended_platform_provider_; |
| + |
| + scoped_ptr<CloudPolicyController> controller_; |
| + scoped_ptr<CloudPolicyContext> cloud_context_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(BrowserPolicyContext); |
| +}; |
| + |
| +} // namespace policy |
| + |
| +#endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONTEXT_H_ |