Commit 47fb9bfd authored by edchin's avatar edchin Committed by Commit Bot

[ios] Install ManagedBookmarksPolicyHandler

This CL installs the ManagedBookmarksPolicyHandler
in policy handler list factory. This is guarded by
a command-line switch: '--install-managed-bookmarks-handler'

Bug: 1065187
Change-Id: Ie103fd92185b1397a3e5da30afd1da9b8384dd1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2142774
Commit-Queue: edchin <edchin@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757934}
parent 711954ca
...@@ -20,6 +20,7 @@ source_set("policy") { ...@@ -20,6 +20,7 @@ source_set("policy") {
deps = [ deps = [
"//base", "//base",
"//components/bookmarks/managed",
"//components/password_manager/core/common", "//components/password_manager/core/common",
"//components/policy:generated", "//components/policy:generated",
"//components/policy/core/common", "//components/policy/core/common",
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/logging.h" #include "base/logging.h"
#include "components/bookmarks/managed/managed_bookmarks_policy_handler.h"
#include "components/password_manager/core/common/password_manager_pref_names.h" #include "components/password_manager/core/common/password_manager_pref_names.h"
#include "components/policy/core/browser/configuration_policy_handler.h" #include "components/policy/core/browser/configuration_policy_handler.h"
#include "components/policy/core/browser/configuration_policy_handler_list.h" #include "components/policy/core/browser/configuration_policy_handler_list.h"
...@@ -51,6 +52,12 @@ std::unique_ptr<policy::ConfigurationPolicyHandlerList> BuildPolicyHandlerList( ...@@ -51,6 +52,12 @@ std::unique_ptr<policy::ConfigurationPolicyHandlerList> BuildPolicyHandlerList(
kSimplePolicyMap[i].policy_name, kSimplePolicyMap[i].preference_path, kSimplePolicyMap[i].policy_name, kSimplePolicyMap[i].preference_path,
kSimplePolicyMap[i].value_type)); kSimplePolicyMap[i].value_type));
} }
if (ShouldInstallManagedBookmarksPolicyHandler()) {
handlers->AddHandler(
std::make_unique<bookmarks::ManagedBookmarksPolicyHandler>(
chrome_schema));
}
} }
return handlers; return handlers;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment