summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdonnelly <jdonnelly@chromium.org>2015-07-13 13:16:24 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-13 20:17:07 +0000
commit87b9e635df71c0bf87715d97d94269f0a6be64aa (patch)
treee29eb86bc3222a214f0712522b6f63d16d413270
parent9ac65bb7a50f7435fc94a333fe6e1c2dda8f0a0b (diff)
downloadchromium_src-87b9e635df71c0bf87715d97d94269f0a6be64aa.zip
chromium_src-87b9e635df71c0bf87715d97d94269f0a6be64aa.tar.gz
chromium_src-87b9e635df71c0bf87715d97d94269f0a6be64aa.tar.bz2
Use standard card unmask triggering on iOS when full-form autofill is enabled.
BUG=504644,484806 Review URL: https://codereview.chromium.org/1232573006 Cr-Commit-Position: refs/heads/master@{#338556}
-rw-r--r--components/autofill/core/browser/autofill_manager.cc11
-rw-r--r--components/components_tests.gyp1
2 files changed, 9 insertions, 3 deletions
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index 716ce62..efca1e0 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -53,6 +53,10 @@
#include "ui/gfx/geometry/rect.h"
#include "url/gurl.h"
+#if defined(OS_IOS)
+#include "components/autofill/ios/browser/autofill_field_trial_ios.h"
+#endif
+
namespace autofill {
using base::TimeTicks;
@@ -551,9 +555,10 @@ bool AutofillManager::WillFillCreditCardNumber(const FormData& form,
return true;
#if defined(OS_IOS)
- // On iOS, we only fill out one field at a time. So we only need to check the
- // current field.
- return false;
+ // On iOS, we only fill out one field at a time (assuming the new full-form
+ // feature isn't enabled). So we only need to check the current field.
+ if (!AutofillFieldTrialIOS::IsFullFormAutofillEnabled())
+ return false;
#endif
// If the relevant section is already autofilled, the new fill operation will
diff --git a/components/components_tests.gyp b/components/components_tests.gyp
index dddb001..4bf8a14 100644
--- a/components/components_tests.gyp
+++ b/components/components_tests.gyp
@@ -994,6 +994,7 @@
'../ios/ios_tests.gyp:test_support_ios',
'../ios/web/ios_web.gyp:test_support_ios_web',
'../third_party/ocmock/ocmock.gyp:ocmock',
+ 'components.gyp:autofill_ios_browser',
'components.gyp:open_from_clipboard',
'components.gyp:sessions_ios',
'components.gyp:signin_ios_browser',