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