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 <limits.h> | 7 #include <limits.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #endif | 70 #endif |
71 | 71 |
72 #if defined(ENABLE_EXTENSIONS) | 72 #if defined(ENABLE_EXTENSIONS) |
73 #include "chrome/browser/extensions/api/messaging/native_messaging_policy_handle
r.h" | 73 #include "chrome/browser/extensions/api/messaging/native_messaging_policy_handle
r.h" |
74 #include "chrome/browser/extensions/extension_management_constants.h" | 74 #include "chrome/browser/extensions/extension_management_constants.h" |
75 #include "chrome/browser/extensions/policy_handlers.h" | 75 #include "chrome/browser/extensions/policy_handlers.h" |
76 #include "extensions/browser/pref_names.h" | 76 #include "extensions/browser/pref_names.h" |
77 #include "extensions/common/manifest.h" | 77 #include "extensions/common/manifest.h" |
78 #endif | 78 #endif |
79 | 79 |
| 80 #if defined(ENABLE_SPELLCHECK) |
| 81 #include "components/spellcheck/browser/pref_names.h" |
| 82 #endif |
| 83 |
80 namespace policy { | 84 namespace policy { |
81 | 85 |
82 namespace { | 86 namespace { |
83 | 87 |
84 // List of policy types to preference names. This is used for simple policies | 88 // List of policy types to preference names. This is used for simple policies |
85 // that directly map to a single preference. | 89 // that directly map to a single preference. |
86 const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { | 90 const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { |
87 { key::kHomepageLocation, | 91 { key::kHomepageLocation, |
88 prefs::kHomePage, | 92 prefs::kHomePage, |
89 base::Value::TYPE_STRING }, | 93 base::Value::TYPE_STRING }, |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 base::Value::TYPE_BOOLEAN }, | 357 base::Value::TYPE_BOOLEAN }, |
354 { key::kAllowDinosaurEasterEgg, | 358 { key::kAllowDinosaurEasterEgg, |
355 prefs::kAllowDinosaurEasterEgg, | 359 prefs::kAllowDinosaurEasterEgg, |
356 base::Value::TYPE_BOOLEAN }, | 360 base::Value::TYPE_BOOLEAN }, |
357 { key::kAllowedDomainsForApps, | 361 { key::kAllowedDomainsForApps, |
358 prefs::kAllowedDomainsForApps, | 362 prefs::kAllowedDomainsForApps, |
359 base::Value::TYPE_STRING }, | 363 base::Value::TYPE_STRING }, |
360 | 364 |
361 #if defined(ENABLE_SPELLCHECK) | 365 #if defined(ENABLE_SPELLCHECK) |
362 { key::kSpellCheckServiceEnabled, | 366 { key::kSpellCheckServiceEnabled, |
363 prefs::kSpellCheckUseSpellingService, | 367 spellcheck::prefs::kSpellCheckUseSpellingService, |
364 base::Value::TYPE_BOOLEAN }, | 368 base::Value::TYPE_BOOLEAN }, |
365 #endif // defined(ENABLE_SPELLCHECK) | 369 #endif // defined(ENABLE_SPELLCHECK) |
366 | 370 |
367 { key::kDisableScreenshots, | 371 { key::kDisableScreenshots, |
368 prefs::kDisableScreenshots, | 372 prefs::kDisableScreenshots, |
369 base::Value::TYPE_BOOLEAN }, | 373 base::Value::TYPE_BOOLEAN }, |
370 { key::kAudioCaptureAllowed, | 374 { key::kAudioCaptureAllowed, |
371 prefs::kAudioCaptureAllowed, | 375 prefs::kAudioCaptureAllowed, |
372 base::Value::TYPE_BOOLEAN }, | 376 base::Value::TYPE_BOOLEAN }, |
373 { key::kVideoCaptureAllowed, | 377 { key::kVideoCaptureAllowed, |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, | 875 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, |
872 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED))); | 876 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED))); |
873 handlers->AddHandler(base::WrapUnique( | 877 handlers->AddHandler(base::WrapUnique( |
874 new chromeos::KeyPermissionsPolicyHandler(chrome_schema))); | 878 new chromeos::KeyPermissionsPolicyHandler(chrome_schema))); |
875 #endif // defined(OS_CHROMEOS) | 879 #endif // defined(OS_CHROMEOS) |
876 | 880 |
877 return handlers; | 881 return handlers; |
878 } | 882 } |
879 | 883 |
880 } // namespace policy | 884 } // namespace policy |
OLD | NEW |