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

Side by Side Diff: chrome/browser/configuration_policy_provider.cc

Issue 2905003: Implement support for disabling sync through configuration management. (Closed)
Patch Set: Fix PrefsControllerTest on MAC. Created 10 years, 5 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 (c) 2010 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/configuration_policy_provider.h" 5 #include "chrome/browser/configuration_policy_provider.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 8
9 namespace { 9 namespace {
10 10
(...skipping 21 matching lines...) Expand all
32 Value::TYPE_STRING, "ProxyBypassList" }, 32 Value::TYPE_STRING, "ProxyBypassList" },
33 { ConfigurationPolicyStore::kPolicyAlternateErrorPagesEnabled, 33 { ConfigurationPolicyStore::kPolicyAlternateErrorPagesEnabled,
34 Value::TYPE_BOOLEAN, "AlternateErrorPagesEnabled" }, 34 Value::TYPE_BOOLEAN, "AlternateErrorPagesEnabled" },
35 { ConfigurationPolicyStore::kPolicySearchSuggestEnabled, 35 { ConfigurationPolicyStore::kPolicySearchSuggestEnabled,
36 Value::TYPE_BOOLEAN, "SearchSuggestEnabled" }, 36 Value::TYPE_BOOLEAN, "SearchSuggestEnabled" },
37 { ConfigurationPolicyStore::kPolicyDnsPrefetchingEnabled, 37 { ConfigurationPolicyStore::kPolicyDnsPrefetchingEnabled,
38 Value::TYPE_BOOLEAN, "DnsPrefetchingEnabled" }, 38 Value::TYPE_BOOLEAN, "DnsPrefetchingEnabled" },
39 { ConfigurationPolicyStore::kPolicySafeBrowsingEnabled, 39 { ConfigurationPolicyStore::kPolicySafeBrowsingEnabled,
40 Value::TYPE_BOOLEAN, "SafeBrowsingEnabled" }, 40 Value::TYPE_BOOLEAN, "SafeBrowsingEnabled" },
41 { ConfigurationPolicyStore::kPolicyMetricsReportingEnabled, 41 { ConfigurationPolicyStore::kPolicyMetricsReportingEnabled,
42 Value::TYPE_BOOLEAN, "MetricsReportingEnabled" } 42 Value::TYPE_BOOLEAN, "MetricsReportingEnabled" },
43 { ConfigurationPolicyStore::kPolicySyncDisabled,
44 Value::TYPE_BOOLEAN, "SyncDisabled" }
43 }; 45 };
44 46
45 } // namespace 47 } // namespace
46 48
47 /* static */ 49 /* static */
48 const ConfigurationPolicyProvider::PolicyValueMap* 50 const ConfigurationPolicyProvider::PolicyValueMap*
49 ConfigurationPolicyProvider::PolicyValueMapping() { 51 ConfigurationPolicyProvider::PolicyValueMapping() {
50 static PolicyValueMap* mapping; 52 static PolicyValueMap* mapping;
51 if (!mapping) { 53 if (!mapping) {
52 mapping = new PolicyValueMap(); 54 mapping = new PolicyValueMap();
53 for (size_t i = 0; i < arraysize(kPolicyValueMap); ++i) { 55 for (size_t i = 0; i < arraysize(kPolicyValueMap); ++i) {
54 const InternalPolicyValueMapEntry& internal_entry = kPolicyValueMap[i]; 56 const InternalPolicyValueMapEntry& internal_entry = kPolicyValueMap[i];
55 PolicyValueMapEntry entry; 57 PolicyValueMapEntry entry;
56 entry.policy_type = internal_entry.policy_type; 58 entry.policy_type = internal_entry.policy_type;
57 entry.value_type = internal_entry.value_type; 59 entry.value_type = internal_entry.value_type;
58 entry.name = std::string(internal_entry.name); 60 entry.name = std::string(internal_entry.name);
59 mapping->push_back(entry); 61 mapping->push_back(entry);
60 } 62 }
61 } 63 }
62 return mapping; 64 return mapping;
63 } 65 }
OLDNEW
« no previous file with comments | « chrome/browser/configuration_policy_pref_store.cc ('k') | chrome/browser/configuration_policy_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698