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

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

Issue 2912353003: Add a path parsing policy handler for the RoamingProfileLocation policy. (Closed)
Patch Set: Created 3 years, 6 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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/bind.h" 13 #include "base/bind.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #include "chrome/browser/net/disk_cache_dir_policy_handler.h" 18 #include "chrome/browser/net/disk_cache_dir_policy_handler.h"
19 #include "chrome/browser/net/safe_search_util.h" 19 #include "chrome/browser/net/safe_search_util.h"
20 #include "chrome/browser/policy/file_selection_dialogs_policy_handler.h" 20 #include "chrome/browser/policy/file_selection_dialogs_policy_handler.h"
21 #include "chrome/browser/policy/javascript_policy_handler.h" 21 #include "chrome/browser/policy/javascript_policy_handler.h"
22 #include "chrome/browser/policy/local_sync_policy_handler.h"
22 #include "chrome/browser/policy/managed_bookmarks_policy_handler.h" 23 #include "chrome/browser/policy/managed_bookmarks_policy_handler.h"
23 #include "chrome/browser/policy/network_prediction_policy_handler.h" 24 #include "chrome/browser/policy/network_prediction_policy_handler.h"
24 #include "chrome/browser/profiles/guest_mode_policy_handler.h" 25 #include "chrome/browser/profiles/guest_mode_policy_handler.h"
25 #include "chrome/browser/profiles/incognito_mode_policy_handler.h" 26 #include "chrome/browser/profiles/incognito_mode_policy_handler.h"
26 #include "chrome/browser/sessions/restore_on_startup_policy_handler.h" 27 #include "chrome/browser/sessions/restore_on_startup_policy_handler.h"
27 #include "chrome/browser/supervised_user/supervised_user_creation_policy_handler .h" 28 #include "chrome/browser/supervised_user/supervised_user_creation_policy_handler .h"
28 #include "chrome/common/chrome_switches.h" 29 #include "chrome/common/chrome_switches.h"
29 #include "chrome/common/features.h" 30 #include "chrome/common/features.h"
30 #include "chrome/common/pref_names.h" 31 #include "chrome/common/pref_names.h"
31 #include "components/bookmarks/common/bookmark_pref_names.h" 32 #include "components/bookmarks/common/bookmark_pref_names.h"
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 prefs::kPinUnlockMaximumLength, 663 prefs::kPinUnlockMaximumLength,
663 base::Value::Type::INTEGER }, 664 base::Value::Type::INTEGER },
664 { key::kPinUnlockWeakPinsAllowed, 665 { key::kPinUnlockWeakPinsAllowed,
665 prefs::kPinUnlockWeakPinsAllowed, 666 prefs::kPinUnlockWeakPinsAllowed,
666 base::Value::Type::BOOLEAN }, 667 base::Value::Type::BOOLEAN },
667 #endif 668 #endif
668 669
669 { key::kRoamingProfileSupportEnabled, 670 { key::kRoamingProfileSupportEnabled,
670 syncer::prefs::kEnableLocalSyncBackend, 671 syncer::prefs::kEnableLocalSyncBackend,
671 base::Value::Type::BOOLEAN }, 672 base::Value::Type::BOOLEAN },
672 { key::kRoamingProfileLocation,
673 syncer::prefs::kLocalSyncBackendDir,
674 base::Value::Type::STRING },
675 673
676 { key::kNetworkTimeQueriesEnabled, 674 { key::kNetworkTimeQueriesEnabled,
677 network_time::prefs::kNetworkTimeQueriesEnabled, 675 network_time::prefs::kNetworkTimeQueriesEnabled,
678 base::Value::Type::BOOLEAN }, 676 base::Value::Type::BOOLEAN },
679 }; 677 };
680 // clang-format on 678 // clang-format on
681 679
682 class ForceSafeSearchPolicyHandler : public TypeCheckingPolicyHandler { 680 class ForceSafeSearchPolicyHandler : public TypeCheckingPolicyHandler {
683 public: 681 public:
684 ForceSafeSearchPolicyHandler() 682 ForceSafeSearchPolicyHandler()
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 #if defined(OS_ANDROID) 864 #if defined(OS_ANDROID)
867 handlers->AddHandler( 865 handlers->AddHandler(
868 base::MakeUnique<ContextualSearchPolicyHandlerAndroid>()); 866 base::MakeUnique<ContextualSearchPolicyHandlerAndroid>());
869 #endif 867 #endif
870 868
871 handlers->AddHandler(base::MakeUnique<FileSelectionDialogsPolicyHandler>()); 869 handlers->AddHandler(base::MakeUnique<FileSelectionDialogsPolicyHandler>());
872 handlers->AddHandler(base::MakeUnique<JavascriptPolicyHandler>()); 870 handlers->AddHandler(base::MakeUnique<JavascriptPolicyHandler>());
873 handlers->AddHandler(base::MakeUnique<NetworkPredictionPolicyHandler>()); 871 handlers->AddHandler(base::MakeUnique<NetworkPredictionPolicyHandler>());
874 handlers->AddHandler(base::MakeUnique<RestoreOnStartupPolicyHandler>()); 872 handlers->AddHandler(base::MakeUnique<RestoreOnStartupPolicyHandler>());
875 handlers->AddHandler(base::MakeUnique<syncer::SyncPolicyHandler>()); 873 handlers->AddHandler(base::MakeUnique<syncer::SyncPolicyHandler>());
874 handlers->AddHandler(base::MakeUnique<LocalSyncPolicyHandler>());
876 875
877 handlers->AddHandler(base::MakeUnique<StringMappingListPolicyHandler>( 876 handlers->AddHandler(base::MakeUnique<StringMappingListPolicyHandler>(
878 key::kEnableDeprecatedWebPlatformFeatures, 877 key::kEnableDeprecatedWebPlatformFeatures,
879 prefs::kEnableDeprecatedWebPlatformFeatures, 878 prefs::kEnableDeprecatedWebPlatformFeatures,
880 base::Bind(GetDeprecatedFeaturesMap))); 879 base::Bind(GetDeprecatedFeaturesMap)));
881 880
882 handlers->AddHandler(base::MakeUnique<BrowsingHistoryPolicyHandler>()); 881 handlers->AddHandler(base::MakeUnique<BrowsingHistoryPolicyHandler>());
883 882
884 #if BUILDFLAG(ENABLE_EXTENSIONS) 883 #if BUILDFLAG(ENABLE_EXTENSIONS)
885 handlers->AddHandler(base::MakeUnique<extensions::ExtensionListPolicyHandler>( 884 handlers->AddHandler(base::MakeUnique<extensions::ExtensionListPolicyHandler>(
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 #endif // defined(OS_CHROMEOS) 1041 #endif // defined(OS_CHROMEOS)
1043 1042
1044 #if BUILDFLAG(ENABLE_PLUGINS) 1043 #if BUILDFLAG(ENABLE_PLUGINS)
1045 handlers->AddHandler(base::MakeUnique<PluginPolicyHandler>()); 1044 handlers->AddHandler(base::MakeUnique<PluginPolicyHandler>());
1046 #endif // BUILDFLAG(ENABLE_PLUGINS) 1045 #endif // BUILDFLAG(ENABLE_PLUGINS)
1047 1046
1048 return handlers; 1047 return handlers;
1049 } 1048 }
1050 1049
1051 } // namespace policy 1050 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698