Commit 05cdafa3 authored by Jeffrey Cohen's avatar Jeffrey Cohen Committed by Commit Bot

Add feature flag for deprecating company name

Bug: 864612
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I5781f919f5903b78f5e922ad9774f9734513de97
Reviewed-on: https://chromium-review.googlesource.com/1173154Reviewed-by: default avatarRoger McFarlane <rogerm@chromium.org>
Reviewed-by: default avatarMoe Ahmadi <mahmadi@chromium.org>
Commit-Queue: Jeffrey Cohen <jeffreycohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583384}
parent 8e335edf
......@@ -4016,6 +4016,10 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kAutofillCacheQueryResponsesName,
flag_descriptions::kAutofillCacheQueryResponsesDescription, kOsAll,
FEATURE_VALUE_TYPE(autofill::features::kAutofillCacheQueryResponses)},
{"autofill-enable-company-name",
flag_descriptions::kAutofillEnableCompanyNameName,
flag_descriptions::kAutofillEnableCompanyNameDescription, kOsAll,
FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCompanyName)},
{"autofill-enforce-min-required-fields-for-heuristics",
flag_descriptions::kAutofillEnforceMinRequiredFieldsForHeuristicsName,
flag_descriptions::
......
......@@ -80,6 +80,11 @@ const char kAutofillCacheQueryResponsesDescription[] =
"When enabled, autofill will cache the responses it receives from the "
"crowd-sourced field type prediction server.";
const char kAutofillEnableCompanyNameName[] =
"Enable Autofill Company Name field";
const char kAutofillEnableCompanyNameDescription[] =
"When enabled, Company Name fields will be auto filled";
const char kAutofillDynamicFormsName[] = "Autofill Dynamic Forms";
const char kAutofillDynamicFormsDescription[] =
"Allows autofill to fill dynamically changing forms";
......
......@@ -76,6 +76,9 @@ extern const char kAsyncImageDecodingDescription[];
extern const char kAutofillCacheQueryResponsesName[];
extern const char kAutofillCacheQueryResponsesDescription[];
extern const char kAutofillEnableCompanyNameName[];
extern const char kAutofillEnableCompanyNameDescription[];
extern const char kAutofillDynamicFormsName[];
extern const char kAutofillDynamicFormsDescription[];
......
......@@ -14,6 +14,7 @@
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/autofill_data_util.h"
#include "components/autofill/core/browser/autofill_type.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_l10n_util.h"
namespace autofill {
......@@ -240,7 +241,8 @@ void CompanyInfo::GetSupportedTypes(ServerFieldTypeSet* supported_types) const {
}
base::string16 CompanyInfo::GetRawInfo(ServerFieldType type) const {
if (type == COMPANY_NAME)
if (type == COMPANY_NAME &&
base::FeatureList::IsEnabled(features::kAutofillEnableCompanyName))
return company_name_;
return base::string16();
......
......@@ -152,5 +152,8 @@ const base::Feature kAutomaticPasswordGeneration = {
const base::Feature kSingleClickAutofill{"SingleClickAutofill",
base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kAutofillEnableCompanyName{
"AutofillEnableCompanyName", base::FEATURE_ENABLED_BY_DEFAULT};
} // namespace features
} // namespace autofill
......@@ -16,6 +16,7 @@ extern const base::Feature kAutofillCacheQueryResponses;
extern const base::Feature kAutofillDownstreamUseGooglePayBrandingOniOS;
extern const base::Feature kAutofillDynamicForms;
extern const base::Feature kAutofillEnableAccountWalletStorage;
extern const base::Feature kAutofillEnableCompanyName;
extern const base::Feature kAutofillEnablePaymentsInteractionsOnAuthError;
extern const base::Feature kAutofillEnforceMinRequiredFieldsForHeuristics;
extern const base::Feature kAutofillEnforceMinRequiredFieldsForQuery;
......
......@@ -351,6 +351,10 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
flag_descriptions::kAutofillCacheQueryResponsesDescription,
flags_ui::kOsIos,
FEATURE_VALUE_TYPE(autofill::features::kAutofillCacheQueryResponses)},
{"autofill-enable-company-name",
flag_descriptions::kAutofillEnableCompanyNameName,
flag_descriptions::kAutofillEnableCompanyNameDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCompanyName)},
{"autofill-manual-fallback", flag_descriptions::kAutofillManualFallbackName,
flag_descriptions::kAutofillManualFallbackDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(autofill::features::kAutofillManualFallback)},
......
......@@ -17,6 +17,11 @@ const char kAutofillCacheQueryResponsesDescription[] =
"When enabled, autofill will cache the responses it receives from the "
"crowd-sourced field type prediction server.";
const char kAutofillEnableCompanyNameName[] =
"Enable Autofill Company Name field";
const char kAutofillEnableCompanyNameDescription[] =
"When enabled, Company Name fields will be auto filled";
const char kAutofillCreditCardUploadName[] =
"Offers uploading Autofilled credit cards";
const char kAutofillCreditCardUploadDescription[] =
......
......@@ -11,6 +11,10 @@ namespace flag_descriptions {
extern const char kAutofillCacheQueryResponsesName[];
extern const char kAutofillCacheQueryResponsesDescription[];
// Title and description for the flag to control deprecating company name.
extern const char kAutofillEnableCompanyNameName[];
extern const char kAutofillEnableCompanyNameDescription[];
// Title and description for the flag to control upstreaming credit cards.
extern const char kAutofillCreditCardUploadName[];
extern const char kAutofillCreditCardUploadDescription[];
......
......@@ -29038,6 +29038,7 @@ from previous Chrome versions.
<int value="646252875" label="ReadItLaterInMenu:enabled"/>
<int value="646738320" label="disable-gesture-editing"/>
<int value="649111851" label="MidiManagerCros:enabled"/>
<int value="649508040" label="AutofillEnableCompanyName:enabled"/>
<int value="651421878" label="VideoRotateToFullscreen:enabled"/>
<int value="651844675" label="EasyUnlockPromotions:enabled"/>
<int value="652561231" label="CustomContextMenu:enabled"/>
......@@ -29371,6 +29372,7 @@ from previous Chrome versions.
<int value="1298981651" label="disable-new-task-manager"/>
<int value="1300282719" label="OfflinePagesBackgroundLoading:enabled"/>
<int value="1302421166" label="NativeNotifications:disabled"/>
<int value="1307003774" label="AutofillEnableCompanyName:disabled"/>
<int value="1308537004" label="force-pnacl-subzero"/>
<int value="1311860720" label="ChromeHomeNtpRedesign:disabled"/>
<int value="1312025202" label="NTPOfflinePageSuggestions:disabled"/>
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