Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Side by Side Diff: components/policy/core/common/mock_configuration_policy_provider.h

Issue 1304843004: Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
40 ConfigurationPolicyProvider::Init(&registry_); 40 ConfigurationPolicyProvider::Init(&registry_);
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());
bartfab (slow) 2015/09/14 14:42:27 I do not understand what you are doing here. SetPo
fhorschig 2015/09/16 13:52:05 You are right, this change should not be relevant.
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698