summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdonnelly <jdonnelly@chromium.org>2016-03-08 21:13:01 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-09 05:15:02 +0000
commitf41a2211a775b1f607eabe0c8e934daa42c15be0 (patch)
treef0b4f9bfeb8a6fcc2ae0191150b045c1f7677983
parent729a518e05c01b45067d28c9eebfb05ef76043ff (diff)
downloadchromium_src-f41a2211a775b1f607eabe0c8e934daa42c15be0.zip
chromium_src-f41a2211a775b1f607eabe0c8e934daa42c15be0.tar.gz
chromium_src-f41a2211a775b1f607eabe0c8e934daa42c15be0.tar.bz2
Enable the save card bubble on Mac without a flag.
BUG=566271 Review URL: https://codereview.chromium.org/1761073005 Cr-Commit-Position: refs/heads/master@{#380073}
-rw-r--r--chrome/browser/ui/autofill/chrome_autofill_client.cc33
-rw-r--r--components/autofill/core/common/autofill_switches.cc8
-rw-r--r--components/autofill/core/common/autofill_switches.h2
3 files changed, 6 insertions, 37 deletions
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc
index 3b8ec54..cd0b096 100644
--- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
+++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
@@ -65,21 +65,6 @@ DEFINE_WEB_CONTENTS_USER_DATA_KEY(autofill::ChromeAutofillClient);
namespace autofill {
-namespace {
-
-#if !defined(OS_ANDROID)
-bool IsSaveCardBubbleEnabled() {
-#if defined(OS_MACOSX)
- return base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableSaveCardBubble);
-#else
- return true;
-#endif
-}
-#endif // !defined(OS_ANDROID)
-
-} // namespace
-
ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents)
: content::WebContentsObserver(web_contents),
unmask_controller_(
@@ -197,18 +182,12 @@ void ChromeAutofillClient::ConfirmSaveCreditCardLocally(
false, card, scoped_ptr<base::DictionaryValue>(nullptr),
callback))));
#else
- if (IsSaveCardBubbleEnabled()) {
- // Do lazy initialization of SaveCardBubbleControllerImpl.
- autofill::SaveCardBubbleControllerImpl::CreateForWebContents(
- web_contents());
- autofill::SaveCardBubbleControllerImpl* controller =
- autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents());
- controller->ShowBubbleForLocalSave(card, callback);
- return;
- }
-
- AutofillCCInfoBarDelegate::CreateForLocalSave(
- InfoBarService::FromWebContents(web_contents()), callback);
+ // Do lazy initialization of SaveCardBubbleControllerImpl.
+ autofill::SaveCardBubbleControllerImpl::CreateForWebContents(
+ web_contents());
+ autofill::SaveCardBubbleControllerImpl* controller =
+ autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents());
+ controller->ShowBubbleForLocalSave(card, callback);
#endif
}
diff --git a/components/autofill/core/common/autofill_switches.cc b/components/autofill/core/common/autofill_switches.cc
index b0078e6..1fa1536 100644
--- a/components/autofill/core/common/autofill_switches.cc
+++ b/components/autofill/core/common/autofill_switches.cc
@@ -33,10 +33,6 @@ const char kDisableOfferUploadCreditCards[] =
// account creation.
const char kDisablePasswordGeneration[] = "disable-password-generation";
-// Disables showing bubble instead of infobar for save credit card prompt.
-const char kDisableSaveCardBubble[] =
- "disable-autofill-save-card-bubble";
-
// The "disable" flag for kEnableSingleClickAutofill.
const char kDisableSingleClickAutofill[] = "disable-single-click-autofill";
@@ -69,10 +65,6 @@ const char kEnableOfferUploadCreditCards[] = "enable-offer-upload-credit-cards";
// account creation.
const char kEnablePasswordGeneration[] = "enable-password-generation";
-// Enables showing bubble instead of infobar for save credit card prompt.
-const char kEnableSaveCardBubble[] =
- "enable-autofill-save-card-bubble";
-
// Enables/disables suggestions without typing anything (on first click).
const char kEnableSingleClickAutofill[] = "enable-single-click-autofill";
diff --git a/components/autofill/core/common/autofill_switches.h b/components/autofill/core/common/autofill_switches.h
index 0f07748..1c34827 100644
--- a/components/autofill/core/common/autofill_switches.h
+++ b/components/autofill/core/common/autofill_switches.h
@@ -18,7 +18,6 @@ extern const char kDisableFullFormAutofillIOS[];
extern const char kDisableOfferStoreUnmaskedWalletCards[];
extern const char kDisableOfferUploadCreditCards[];
extern const char kDisablePasswordGeneration[];
-extern const char kDisableSaveCardBubble[];
extern const char kDisableSingleClickAutofill[];
extern const char kEnableCreditCardScan[];
extern const char kEnableFillOnAccountSelect[];
@@ -27,7 +26,6 @@ extern const char kEnableFullFormAutofillIOS[];
extern const char kEnableOfferStoreUnmaskedWalletCards[];
extern const char kEnableOfferUploadCreditCards[];
extern const char kEnablePasswordGeneration[];
-extern const char kEnableSaveCardBubble[];
extern const char kEnableSingleClickAutofill[];
extern const char kEnableSuggestionsWithSubstringMatch[];
extern const char kIgnoreAutocompleteOffForAutofill[];