Commit c1900c58 authored by Tina Wang's avatar Tina Wang Committed by Commit Bot

[iOS Enterprise] Enable AutofillAddressEnabled policy on ios

- Add AutofillAddressEnabled policy to simple policy map.
- Edit policy_test_cases.json to enable unit test.

Bug: 1066475
Change-Id: If8d73c2eaf891599a08854411dc94e064323187b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2149639
Commit-Queue: Tina Wang <tinazwang@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Reviewed-by: default avatarsebsg <sebsg@chromium.org>
Reviewed-by: default avatarJulian Pastarmov <pastarmovj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760723}
parent fd6f33e2
......@@ -30,6 +30,8 @@ jumbo_static_library("browser") {
"address_rewriter.h",
"autocomplete_history_manager.cc",
"autocomplete_history_manager.h",
"autofill_address_policy_handler.cc",
"autofill_address_policy_handler.h",
"autofill_address_util.cc",
"autofill_address_util.h",
"autofill_browser_util.cc",
......@@ -317,8 +319,6 @@ jumbo_static_library("browser") {
if (!is_ios) {
sources += [
"autofill_address_policy_handler.cc",
"autofill_address_policy_handler.h",
"autofill_policy_handler.cc",
"autofill_policy_handler.h",
"payments/credit_card_fido_authenticator.cc",
......@@ -539,6 +539,7 @@ source_set("unit_tests") {
"address_normalizer_impl_unittest.cc",
"address_rewriter_unittest.cc",
"autocomplete_history_manager_unittest.cc",
"autofill_address_policy_handler_unittest.cc",
"autofill_credit_card_policy_handler_unittest.cc",
"autofill_data_util_unittest.cc",
"autofill_download_manager_unittest.cc",
......@@ -622,7 +623,6 @@ source_set("unit_tests") {
if (!is_ios) {
sources += [
"autofill_address_policy_handler_unittest.cc",
"autofill_policy_handler_unittest.cc",
"payments/credit_card_fido_authenticator_unittest.cc",
]
......
......@@ -3081,6 +3081,7 @@
'chrome.*:69-',
'chrome_os:69-',
'android:69-',
'ios:84-',
],
'features': {
'can_be_recommended': True,
......
......@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "components/autofill/core/browser/autofill_address_policy_handler.h"
#include "components/autofill/core/browser/autofill_credit_card_policy_handler.h"
#include "components/bookmarks/common/bookmark_pref_names.h"
#include "components/bookmarks/managed/managed_bookmarks_policy_handler.h"
......@@ -69,6 +70,8 @@ std::unique_ptr<policy::ConfigurationPolicyHandlerList> BuildPolicyHandlerList(
kSimplePolicyMap[i].value_type));
}
handlers->AddHandler(
std::make_unique<autofill::AutofillAddressPolicyHandler>());
handlers->AddHandler(
std::make_unique<autofill::AutofillCreditCardPolicyHandler>());
......
......@@ -24,6 +24,17 @@
]
},
"AutofillAddressEnabled": {
"os": [ "ios" ],
"can_be_recommended": true,
"policy_pref_mapping_test": [
{
"policies": { "AutofillAddressEnabled": false },
"prefs": { "autofill.profile_enabled": {} }
}
]
},
"AutofillCreditCardEnabled": {
"os": [ "ios" ],
"can_be_recommended": true,
......
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