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

Side by Side Diff: chrome/browser/mock_configuration_policy_store.h

Issue 2027010: Preference provider implementation backed by JSON files in a directory. (Closed)
Patch Set: A few more fixes. Created 10 years, 7 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
« no previous file with comments | « chrome/browser/configuration_policy_provider.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 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_MOCK_CONFIGURATION_POLICY_STORE_H_
6 #define CHROME_BROWSER_MOCK_CONFIGURATION_POLICY_STORE_H_
7
8 #include <map>
9
10 #include "base/stl_util-inl.h"
11 #include "chrome/browser/configuration_policy_store.h"
12
13 // Mock ConfigurationPolicyStore implementation that records values for policy
14 // settings as they get set.
15 class MockConfigurationPolicyStore : public ConfigurationPolicyStore {
16 public:
17 MockConfigurationPolicyStore() {}
18 ~MockConfigurationPolicyStore() {
19 STLDeleteValues(&policy_map_);
20 }
21
22 typedef std::map<ConfigurationPolicyStore::PolicyType, Value*> PolicyMap;
23 const PolicyMap& policy_map() { return policy_map_; }
24
25 // ConfigurationPolicyStore implementation.
26 virtual void Apply(PolicyType policy, Value* value) {
27 policy_map_[policy] = value;
28 }
29
30 private:
31 PolicyMap policy_map_;
32 };
33
34 #endif // CHROME_BROWSER_MOCK_CONFIGURATION_POLICY_STORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/configuration_policy_provider.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698