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

Unified Diff: chrome/browser/ui/android/autofill/credit_card_scanner_view_android.cc

Issue 2257493004: Add "AutofillScanCardholderName" feature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable feature by default Created 4 years, 4 months 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
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_experiments.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/android/autofill/credit_card_scanner_view_android.cc
diff --git a/chrome/browser/ui/android/autofill/credit_card_scanner_view_android.cc b/chrome/browser/ui/android/autofill/credit_card_scanner_view_android.cc
index 13cc10a646c65aa52dc5e3ac61121b122782e75b..ef1b3bc0dc3c6ca81ee626ead2c3188453971704 100644
--- a/chrome/browser/ui/android/autofill/credit_card_scanner_view_android.cc
+++ b/chrome/browser/ui/android/autofill/credit_card_scanner_view_android.cc
@@ -9,9 +9,11 @@
#include "base/android/context_utils.h"
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
+#include "base/feature_list.h"
#include "base/memory/ptr_util.h"
#include "chrome/browser/ui/android/view_android_helper.h"
#include "chrome/browser/ui/autofill/credit_card_scanner_view_delegate.h"
+#include "components/autofill/core/browser/autofill_experiments.h"
#include "components/autofill/core/browser/credit_card.h"
#include "components/autofill/core/browser/field_types.h"
#include "content/public/browser/android/content_view_core.h"
@@ -75,8 +77,12 @@ void CreditCardScannerViewAndroid::ScanCompleted(
jint expiration_year) {
CreditCard card(base::android::ConvertJavaStringToUTF16(env, card_number),
static_cast<int>(expiration_month), static_cast<int>(expiration_year));
- card.SetRawInfo(CREDIT_CARD_NAME_FULL,
- base::android::ConvertJavaStringToUTF16(env, card_holder_name));
+
+ if (base::FeatureList::IsEnabled(kAutofillScanCardholderName)) {
+ card.SetRawInfo(CREDIT_CARD_NAME_FULL,
+ base::android::ConvertJavaStringToUTF16(env, card_holder_name));
+ }
+
delegate_->ScanCompleted(card);
}
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_experiments.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698