| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_POLICY_CORE_COMMON_MOCK_CONFIGURATION_POLICY_PROVIDER_H_ | 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_MOCK_CONFIGURATION_POLICY_PROVIDER_H_ |
| 6 #define COMPONENTS_POLICY_CORE_COMMON_MOCK_CONFIGURATION_POLICY_PROVIDER_H_ | 6 #define COMPONENTS_POLICY_CORE_COMMON_MOCK_CONFIGURATION_POLICY_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "components/policy/core/common/configuration_policy_provider.h" | 9 #include "components/policy/core/common/configuration_policy_provider.h" |
| 10 #include "components/policy/core/common/policy_map.h" | 10 #include "components/policy/core/common/policy_map.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 ConfigurationPolicyProvider::Init(®istry_); | 40 ConfigurationPolicyProvider::Init(®istry_); |
| 41 } | 41 } |
| 42 | 42 |
| 43 // Convenience method that installs an expectation on RefreshPolicies that | 43 // Convenience method that installs an expectation on RefreshPolicies that |
| 44 // just notifies the observers and serves the same policies. | 44 // just notifies the observers and serves the same policies. |
| 45 void SetAutoRefresh(); | 45 void SetAutoRefresh(); |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 void RefreshWithSamePolicies(); | 48 void RefreshWithSamePolicies(); |
| 49 | 49 |
| 50 // Hide method of ConfigurationPolicyProvider so sources stay unchanged. |
| 51 MOCK_METHOD0(SetPolicySources, void()); |
| 52 |
| 50 SchemaRegistry registry_; | 53 SchemaRegistry registry_; |
| 51 | 54 |
| 52 DISALLOW_COPY_AND_ASSIGN(MockConfigurationPolicyProvider); | 55 DISALLOW_COPY_AND_ASSIGN(MockConfigurationPolicyProvider); |
| 53 }; | 56 }; |
| 54 | 57 |
| 55 class MockConfigurationPolicyObserver | 58 class MockConfigurationPolicyObserver |
| 56 : public ConfigurationPolicyProvider::Observer { | 59 : public ConfigurationPolicyProvider::Observer { |
| 57 public: | 60 public: |
| 58 MockConfigurationPolicyObserver(); | 61 MockConfigurationPolicyObserver(); |
| 59 virtual ~MockConfigurationPolicyObserver(); | 62 virtual ~MockConfigurationPolicyObserver(); |
| 60 | 63 |
| 61 MOCK_METHOD1(OnUpdatePolicy, void(ConfigurationPolicyProvider*)); | 64 MOCK_METHOD1(OnUpdatePolicy, void(ConfigurationPolicyProvider*)); |
| 62 }; | 65 }; |
| 63 | 66 |
| 64 } // namespace policy | 67 } // namespace policy |
| 65 | 68 |
| 66 #endif // COMPONENTS_POLICY_CORE_COMMON_MOCK_CONFIGURATION_POLICY_PROVIDER_H_ | 69 #endif // COMPONENTS_POLICY_CORE_COMMON_MOCK_CONFIGURATION_POLICY_PROVIDER_H_ |
| OLD | NEW |