| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_KEEPER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_KEEPER_H_ |
| 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_KEEPER_H_ | 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_KEEPER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "chrome/browser/policy/configuration_policy_provider.h" | 10 #include "chrome/browser/policy/configuration_policy_provider.h" |
| 11 | 11 |
| 12 namespace policy { | 12 namespace policy { |
| 13 | 13 |
| 14 // Manages the lifecycle of the shared platform-specific policy providers for | 14 // Manages the lifecycle of the shared platform-specific policy providers for |
| 15 // managed platform, device management and recommended policy. | 15 // managed platform, device management and recommended policy. |
| 16 class ConfigurationPolicyProviderKeeper { | 16 class ConfigurationPolicyProviderKeeper { |
| 17 public: | 17 public: |
| 18 ConfigurationPolicyProviderKeeper(); | 18 ConfigurationPolicyProviderKeeper(); |
| 19 // Tests can pass in their own (dummy) providers using this c'tor. | 19 // Tests can pass in their own (dummy) providers using this c'tor. |
| 20 ConfigurationPolicyProviderKeeper( | 20 ConfigurationPolicyProviderKeeper( |
| 21 ConfigurationPolicyProvider* managed_platform_provider, | 21 ConfigurationPolicyProvider* managed_platform_provider, |
| 22 ConfigurationPolicyProvider* device_management_provider, | 22 ConfigurationPolicyProvider* device_management_provider, |
| 23 ConfigurationPolicyProvider* recommended_provider); | 23 ConfigurationPolicyProvider* recommended_provider); |
| 24 virtual ~ConfigurationPolicyProviderKeeper() {} | 24 virtual ~ConfigurationPolicyProviderKeeper(); |
| 25 | 25 |
| 26 ConfigurationPolicyProvider* managed_platform_provider() const; | 26 ConfigurationPolicyProvider* managed_platform_provider() const; |
| 27 | 27 |
| 28 ConfigurationPolicyProvider* device_management_provider() const; | 28 ConfigurationPolicyProvider* device_management_provider() const; |
| 29 | 29 |
| 30 ConfigurationPolicyProvider* recommended_provider() const; | 30 ConfigurationPolicyProvider* recommended_provider() const; |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 scoped_ptr<ConfigurationPolicyProvider> managed_platform_provider_; | 33 scoped_ptr<ConfigurationPolicyProvider> managed_platform_provider_; |
| 34 scoped_ptr<ConfigurationPolicyProvider> device_management_provider_; | 34 scoped_ptr<ConfigurationPolicyProvider> device_management_provider_; |
| 35 scoped_ptr<ConfigurationPolicyProvider> recommended_provider_; | 35 scoped_ptr<ConfigurationPolicyProvider> recommended_provider_; |
| 36 | 36 |
| 37 static ConfigurationPolicyProvider* CreateManagedPlatformProvider(); | 37 static ConfigurationPolicyProvider* CreateManagedPlatformProvider(); |
| 38 static ConfigurationPolicyProvider* CreateDeviceManagementProvider(); | 38 static ConfigurationPolicyProvider* CreateDeviceManagementProvider(); |
| 39 static ConfigurationPolicyProvider* CreateRecommendedProvider(); | 39 static ConfigurationPolicyProvider* CreateRecommendedProvider(); |
| 40 | 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyProviderKeeper); | 41 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyProviderKeeper); |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 } // namespace policy | 44 } // namespace policy |
| 45 | 45 |
| 46 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_KEEPER_H_ | 46 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_KEEPER_H_ |
| OLD | NEW |