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

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

Issue 2551373002: Disable supervised user creation when force sign in is enabled. (Closed)
Patch Set: merge from master Created 4 years 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>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "chrome/browser/net/disk_cache_dir_policy_handler.h" 17 #include "chrome/browser/net/disk_cache_dir_policy_handler.h"
18 #include "chrome/browser/net/safe_search_util.h" 18 #include "chrome/browser/net/safe_search_util.h"
19 #include "chrome/browser/policy/file_selection_dialogs_policy_handler.h" 19 #include "chrome/browser/policy/file_selection_dialogs_policy_handler.h"
20 #include "chrome/browser/policy/javascript_policy_handler.h" 20 #include "chrome/browser/policy/javascript_policy_handler.h"
21 #include "chrome/browser/policy/managed_bookmarks_policy_handler.h" 21 #include "chrome/browser/policy/managed_bookmarks_policy_handler.h"
22 #include "chrome/browser/policy/network_prediction_policy_handler.h" 22 #include "chrome/browser/policy/network_prediction_policy_handler.h"
23 #include "chrome/browser/profiles/guest_mode_policy_handler.h" 23 #include "chrome/browser/profiles/guest_mode_policy_handler.h"
24 #include "chrome/browser/profiles/incognito_mode_policy_handler.h" 24 #include "chrome/browser/profiles/incognito_mode_policy_handler.h"
25 #include "chrome/browser/sessions/restore_on_startup_policy_handler.h" 25 #include "chrome/browser/sessions/restore_on_startup_policy_handler.h"
26 #include "chrome/browser/supervised_user/supervised_user_creation_policy_handler .h"
26 #include "chrome/common/chrome_switches.h" 27 #include "chrome/common/chrome_switches.h"
27 #include "chrome/common/features.h" 28 #include "chrome/common/features.h"
28 #include "chrome/common/pref_names.h" 29 #include "chrome/common/pref_names.h"
29 #include "components/bookmarks/common/bookmark_pref_names.h" 30 #include "components/bookmarks/common/bookmark_pref_names.h"
30 #include "components/certificate_transparency/pref_names.h" 31 #include "components/certificate_transparency/pref_names.h"
31 #include "components/content_settings/core/common/pref_names.h" 32 #include "components/content_settings/core/common/pref_names.h"
32 #include "components/metrics/metrics_pref_names.h" 33 #include "components/metrics/metrics_pref_names.h"
33 #include "components/ntp_snippets/pref_names.h" 34 #include "components/ntp_snippets/pref_names.h"
34 #include "components/password_manager/core/common/password_manager_pref_names.h" 35 #include "components/password_manager/core/common/password_manager_pref_names.h"
35 #include "components/policy/core/browser/autofill_policy_handler.h" 36 #include "components/policy/core/browser/autofill_policy_handler.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 base::Value::Type::LIST }, 390 base::Value::Type::LIST },
390 { key::kVideoCaptureAllowedUrls, 391 { key::kVideoCaptureAllowedUrls,
391 prefs::kVideoCaptureAllowedUrls, 392 prefs::kVideoCaptureAllowedUrls,
392 base::Value::Type::LIST }, 393 base::Value::Type::LIST },
393 { key::kHideWebStoreIcon, 394 { key::kHideWebStoreIcon,
394 prefs::kHideWebStoreIcon, 395 prefs::kHideWebStoreIcon,
395 base::Value::Type::BOOLEAN }, 396 base::Value::Type::BOOLEAN },
396 { key::kVariationsRestrictParameter, 397 { key::kVariationsRestrictParameter,
397 variations::prefs::kVariationsRestrictParameter, 398 variations::prefs::kVariationsRestrictParameter,
398 base::Value::Type::STRING }, 399 base::Value::Type::STRING },
399 { key::kSupervisedUserCreationEnabled,
400 prefs::kSupervisedUserCreationAllowed,
401 base::Value::Type::BOOLEAN },
402 { key::kForceEphemeralProfiles, 400 { key::kForceEphemeralProfiles,
403 prefs::kForceEphemeralProfiles, 401 prefs::kForceEphemeralProfiles,
404 base::Value::Type::BOOLEAN }, 402 base::Value::Type::BOOLEAN },
405 { key::kDHEEnabled, 403 { key::kDHEEnabled,
406 ssl_config::prefs::kDHEEnabled, 404 ssl_config::prefs::kDHEEnabled,
407 base::Value::Type::BOOLEAN }, 405 base::Value::Type::BOOLEAN },
408 { key::kNTPContentSuggestionsEnabled, 406 { key::kNTPContentSuggestionsEnabled,
409 ntp_snippets::prefs::kEnableSnippets, 407 ntp_snippets::prefs::kEnableSnippets,
410 base::Value::Type::BOOLEAN }, 408 base::Value::Type::BOOLEAN },
411 #if defined(ENABLE_MEDIA_ROUTER) 409 #if defined(ENABLE_MEDIA_ROUTER)
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 handlers->AddHandler(base::MakeUnique<DiskCacheDirPolicyHandler>()); 798 handlers->AddHandler(base::MakeUnique<DiskCacheDirPolicyHandler>());
801 799
802 handlers->AddHandler( 800 handlers->AddHandler(
803 base::MakeUnique<extensions::NativeMessagingHostListPolicyHandler>( 801 base::MakeUnique<extensions::NativeMessagingHostListPolicyHandler>(
804 key::kNativeMessagingWhitelist, 802 key::kNativeMessagingWhitelist,
805 extensions::pref_names::kNativeMessagingWhitelist, false)); 803 extensions::pref_names::kNativeMessagingWhitelist, false));
806 handlers->AddHandler( 804 handlers->AddHandler(
807 base::MakeUnique<extensions::NativeMessagingHostListPolicyHandler>( 805 base::MakeUnique<extensions::NativeMessagingHostListPolicyHandler>(
808 key::kNativeMessagingBlacklist, 806 key::kNativeMessagingBlacklist,
809 extensions::pref_names::kNativeMessagingBlacklist, true)); 807 extensions::pref_names::kNativeMessagingBlacklist, true));
808 handlers->AddHandler(base::MakeUnique<SupervisedUserCreationPolicyHandler>());
810 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 809 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
811 810
812 #if !defined(OS_ANDROID) 811 #if !defined(OS_ANDROID)
813 handlers->AddHandler(base::WrapUnique(new DownloadDirPolicyHandler)); 812 handlers->AddHandler(base::WrapUnique(new DownloadDirPolicyHandler));
814 813
815 handlers->AddHandler(base::MakeUnique<SimpleSchemaValidatingPolicyHandler>( 814 handlers->AddHandler(base::MakeUnique<SimpleSchemaValidatingPolicyHandler>(
816 key::kRegisteredProtocolHandlers, 815 key::kRegisteredProtocolHandlers,
817 prefs::kPolicyRegisteredProtocolHandlers, chrome_schema, SCHEMA_STRICT, 816 prefs::kPolicyRegisteredProtocolHandlers, chrome_schema, SCHEMA_STRICT,
818 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, 817 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED,
819 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED)); 818 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED));
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 #endif // defined(OS_CHROMEOS) 928 #endif // defined(OS_CHROMEOS)
930 929
931 #if BUILDFLAG(ENABLE_PLUGINS) 930 #if BUILDFLAG(ENABLE_PLUGINS)
932 handlers->AddHandler(base::MakeUnique<PluginPolicyHandler>()); 931 handlers->AddHandler(base::MakeUnique<PluginPolicyHandler>());
933 #endif // BUILDFLAG(ENABLE_PLUGINS) 932 #endif // BUILDFLAG(ENABLE_PLUGINS)
934 933
935 return handlers; 934 return handlers;
936 } 935 }
937 936
938 } // namespace policy 937 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/supervised_user/supervised_user_creation_policy_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698