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 #include "chrome/browser/policy/configuration_policy_handler_list_factory.h" | 5 #include "chrome/browser/policy/configuration_policy_handler_list_factory.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/prefs/pref_value_map.h" | 10 #include "base/prefs/pref_value_map.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 base::Value::TYPE_BOOLEAN }, | 119 base::Value::TYPE_BOOLEAN }, |
120 { key::kPrintingEnabled, | 120 { key::kPrintingEnabled, |
121 prefs::kPrintingEnabled, | 121 prefs::kPrintingEnabled, |
122 base::Value::TYPE_BOOLEAN }, | 122 base::Value::TYPE_BOOLEAN }, |
123 { key::kDisablePrintPreview, | 123 { key::kDisablePrintPreview, |
124 prefs::kPrintPreviewDisabled, | 124 prefs::kPrintPreviewDisabled, |
125 base::Value::TYPE_BOOLEAN }, | 125 base::Value::TYPE_BOOLEAN }, |
126 { key::kDefaultPrinterSelection, | 126 { key::kDefaultPrinterSelection, |
127 prefs::kPrintPreviewDefaultDestinationSelectionRules, | 127 prefs::kPrintPreviewDefaultDestinationSelectionRules, |
128 base::Value::TYPE_STRING }, | 128 base::Value::TYPE_STRING }, |
129 { key::kMetricsReportingEnabled, | |
130 metrics::prefs::kMetricsReportingEnabled, | |
131 base::Value::TYPE_BOOLEAN }, | |
132 { key::kApplicationLocaleValue, | 129 { key::kApplicationLocaleValue, |
133 prefs::kApplicationLocale, | 130 prefs::kApplicationLocale, |
134 base::Value::TYPE_STRING }, | 131 base::Value::TYPE_STRING }, |
135 { key::kDisabledPlugins, | 132 { key::kDisabledPlugins, |
136 prefs::kPluginsDisabledPlugins, | 133 prefs::kPluginsDisabledPlugins, |
137 base::Value::TYPE_LIST }, | 134 base::Value::TYPE_LIST }, |
138 { key::kDisabledPluginsExceptions, | 135 { key::kDisabledPluginsExceptions, |
139 prefs::kPluginsDisabledPluginsExceptions, | 136 prefs::kPluginsDisabledPluginsExceptions, |
140 base::Value::TYPE_LIST }, | 137 base::Value::TYPE_LIST }, |
141 { key::kEnabledPlugins, | 138 { key::kEnabledPlugins, |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 prefs::kCaptivePortalAuthenticationIgnoresProxy, | 483 prefs::kCaptivePortalAuthenticationIgnoresProxy, |
487 base::Value::TYPE_BOOLEAN }, | 484 base::Value::TYPE_BOOLEAN }, |
488 { key::kForceMaximizeOnFirstRun, | 485 { key::kForceMaximizeOnFirstRun, |
489 prefs::kForceMaximizeOnFirstRun, | 486 prefs::kForceMaximizeOnFirstRun, |
490 base::Value::TYPE_BOOLEAN }, | 487 base::Value::TYPE_BOOLEAN }, |
491 { key::kUnifiedDesktopEnabledByDefault, | 488 { key::kUnifiedDesktopEnabledByDefault, |
492 prefs::kUnifiedDesktopEnabledByDefault, | 489 prefs::kUnifiedDesktopEnabledByDefault, |
493 base::Value::TYPE_BOOLEAN }, | 490 base::Value::TYPE_BOOLEAN }, |
494 #endif // defined(OS_CHROMEOS) | 491 #endif // defined(OS_CHROMEOS) |
495 | 492 |
| 493 // Metrics reporting is controlled by a platform specific policy for ChromeOS |
| 494 #if defined(OS_CHROMEOS) |
| 495 { key::kDeviceMetricsReportingEnabled, |
| 496 metrics::prefs::kMetricsReportingEnabled, |
| 497 base::Value::TYPE_BOOLEAN }, |
| 498 #else |
| 499 { key::kMetricsReportingEnabled, |
| 500 metrics::prefs::kMetricsReportingEnabled, |
| 501 base::Value::TYPE_BOOLEAN }, |
| 502 #endif |
| 503 |
496 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) | 504 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
497 { key::kBackgroundModeEnabled, | 505 { key::kBackgroundModeEnabled, |
498 prefs::kBackgroundModeEnabled, | 506 prefs::kBackgroundModeEnabled, |
499 base::Value::TYPE_BOOLEAN }, | 507 base::Value::TYPE_BOOLEAN }, |
500 #endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) | 508 #endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
501 | 509 |
502 #if defined(OS_ANDROID) | 510 #if defined(OS_ANDROID) |
503 { key::kDataCompressionProxyEnabled, | 511 { key::kDataCompressionProxyEnabled, |
504 data_reduction_proxy::prefs::kDataReductionProxyEnabled, | 512 data_reduction_proxy::prefs::kDataReductionProxyEnabled, |
505 base::Value::TYPE_BOOLEAN }, | 513 base::Value::TYPE_BOOLEAN }, |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, | 814 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, |
807 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED))); | 815 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED))); |
808 handlers->AddHandler(make_scoped_ptr( | 816 handlers->AddHandler(make_scoped_ptr( |
809 new chromeos::KeyPermissionsPolicyHandler(chrome_schema))); | 817 new chromeos::KeyPermissionsPolicyHandler(chrome_schema))); |
810 #endif // defined(OS_CHROMEOS) | 818 #endif // defined(OS_CHROMEOS) |
811 | 819 |
812 return handlers.Pass(); | 820 return handlers.Pass(); |
813 } | 821 } |
814 | 822 |
815 } // namespace policy | 823 } // namespace policy |
OLD | NEW |