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

Side by Side Diff: chrome/browser/policy/configuration_policy_handler_list_factory.cc

Issue 2244083002: Componentize spellcheck [4]: spellcheck/browser and android java-side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more cleanup Created 4 years, 4 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 #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
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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 base::Value::TYPE_BOOLEAN }, 354 base::Value::TYPE_BOOLEAN },
351 { key::kAllowDinosaurEasterEgg, 355 { key::kAllowDinosaurEasterEgg,
352 prefs::kAllowDinosaurEasterEgg, 356 prefs::kAllowDinosaurEasterEgg,
353 base::Value::TYPE_BOOLEAN }, 357 base::Value::TYPE_BOOLEAN },
354 { key::kAllowedDomainsForApps, 358 { key::kAllowedDomainsForApps,
355 prefs::kAllowedDomainsForApps, 359 prefs::kAllowedDomainsForApps,
356 base::Value::TYPE_STRING }, 360 base::Value::TYPE_STRING },
357 361
358 #if defined(ENABLE_SPELLCHECK) 362 #if defined(ENABLE_SPELLCHECK)
359 { key::kSpellCheckServiceEnabled, 363 { key::kSpellCheckServiceEnabled,
360 prefs::kSpellCheckUseSpellingService, 364 spellcheck::prefs::kSpellCheckUseSpellingService,
361 base::Value::TYPE_BOOLEAN }, 365 base::Value::TYPE_BOOLEAN },
362 #endif // defined(ENABLE_SPELLCHECK) 366 #endif // defined(ENABLE_SPELLCHECK)
363 367
364 { key::kDisableScreenshots, 368 { key::kDisableScreenshots,
365 prefs::kDisableScreenshots, 369 prefs::kDisableScreenshots,
366 base::Value::TYPE_BOOLEAN }, 370 base::Value::TYPE_BOOLEAN },
367 { key::kAudioCaptureAllowed, 371 { key::kAudioCaptureAllowed,
368 prefs::kAudioCaptureAllowed, 372 prefs::kAudioCaptureAllowed,
369 base::Value::TYPE_BOOLEAN }, 373 base::Value::TYPE_BOOLEAN },
370 { key::kVideoCaptureAllowed, 374 { key::kVideoCaptureAllowed,
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, 872 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED,
869 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED))); 873 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED)));
870 handlers->AddHandler(base::WrapUnique( 874 handlers->AddHandler(base::WrapUnique(
871 new chromeos::KeyPermissionsPolicyHandler(chrome_schema))); 875 new chromeos::KeyPermissionsPolicyHandler(chrome_schema)));
872 #endif // defined(OS_CHROMEOS) 876 #endif // defined(OS_CHROMEOS)
873 877
874 return handlers; 878 return handlers;
875 } 879 }
876 880
877 } // namespace policy 881 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698