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

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

Issue 991983003: Credit card scanning field trial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index 50cc603d1bb750527607942061294324cf15b013..640fa8912495b872f3ee90cc0036cfe9d44a4c65 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -16,6 +16,7 @@
#include "base/guid.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#include "base/metrics/field_trial.h"
#include "base/prefs/pref_service.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
@@ -296,7 +297,10 @@ int AutofillManager::AccessAddressBookPromptCount() {
bool AutofillManager::ShouldShowScanCreditCard(const FormData& form,
const FormFieldData& field) {
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
- autofill::switches::kEnableCreditCardScan)) {
+ autofill::switches::kEnableCreditCardScan) &&
+ (base::FieldTrialList::FindFullName("CreditCardScan") != "Enabled" ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ autofill::switches::kDisableCreditCardScan))) {
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698