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

Unified Diff: components/autofill/core/browser/autofill_external_delegate.cc

Issue 756333003: Prompt for unmasking Wallet credit card on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile post-merge Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/autofill_external_delegate.cc
diff --git a/components/autofill/core/browser/autofill_external_delegate.cc b/components/autofill/core/browser/autofill_external_delegate.cc
index 82a6d670a75666653ddc900ea3b480499efa17c8..9cbe15dcd8c6b69f9723adca5520f3b20254efb3 100644
--- a/components/autofill/core/browser/autofill_external_delegate.cc
+++ b/components/autofill/core/browser/autofill_external_delegate.cc
@@ -102,6 +102,15 @@ void AutofillExternalDelegate::OnSuggestionsReturned(
// Add or hide warnings as appropriate.
ApplyAutofillWarnings(&values, &labels, &icons, &ids);
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableWalletCardImport)) {
+ // For now, add a fake masked card.
+ values.push_back(base::ASCIIToUTF16("Visa - 1111"));
+ labels.push_back(base::ASCIIToUTF16("[tap to unlock]"));
+ icons.push_back(base::string16());
+ ids.push_back(POPUP_ITEM_ID_FAKE_MASKED_INSTRUMENT);
+ }
+
// Add a separator to go between the values and menu items.
values.push_back(base::string16());
labels.push_back(base::string16());
@@ -264,6 +273,8 @@ void AutofillExternalDelegate::DidAcceptSuggestion(const base::string16& value,
} else if (identifier == POPUP_ITEM_ID_SCAN_CREDIT_CARD) {
manager_->client()->ScanCreditCard(base::Bind(
&AutofillExternalDelegate::OnCreditCardScanned, GetWeakPtr()));
+ } else if (identifier == POPUP_ITEM_ID_FAKE_MASKED_INSTRUMENT) {
+ manager_->client()->ShowUnmaskPrompt();
} else {
FillAutofillFormData(identifier, false);
}
« no previous file with comments | « components/autofill/core/browser/autofill_client.h ('k') | components/autofill/core/browser/popup_item_ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698