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