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_DUMMY_CLOUD_POLICY_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_POLICY_DUMMY_CLOUD_POLICY_PROVIDER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "chrome/browser/policy/cloud_policy_provider.h" |
| 10 |
| 11 namespace policy { |
| 12 |
| 13 // A cloud policy provider for tests, that provides 0 policies, but always |
| 14 // reports that it is initialized. |
| 15 class DummyCloudPolicyProvider : public CloudPolicyProvider { |
| 16 public: |
| 17 explicit DummyCloudPolicyProvider(const PolicyDefinitionList* policy_list); |
| 18 virtual ~DummyCloudPolicyProvider(); |
| 19 |
| 20 // CloudPolicyProvider overrides: |
| 21 virtual void AppendCache(CloudPolicyCacheBase* cache) OVERRIDE; |
| 22 virtual void PrependCache(CloudPolicyCacheBase* cache) OVERRIDE; |
| 23 |
| 24 virtual bool Provide(ConfigurationPolicyStoreInterface* store); |
| 25 |
| 26 private: |
| 27 // ConfigurationPolicyProvider overrides: |
| 28 virtual void AddObserver( |
| 29 ConfigurationPolicyProvider::Observer* observer) OVERRIDE; |
| 30 virtual void RemoveObserver( |
| 31 ConfigurationPolicyProvider::Observer* observer) OVERRIDE; |
| 32 |
| 33 ObserverList<ConfigurationPolicyProvider::Observer, true> observer_list_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(DummyCloudPolicyProvider); |
| 36 }; |
| 37 |
| 38 } // namespace policy |
| 39 |
| 40 #endif // CHROME_BROWSER_POLICY_DUMMY_CLOUD_POLICY_PROVIDER_H_ |
OLD | NEW |