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

Unified Diff: chrome/browser/autofill/form_structure.cc

Issue 11264053: Added switch to guard all autofill new elements work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
Index: chrome/browser/autofill/form_structure.cc
diff --git a/chrome/browser/autofill/form_structure.cc b/chrome/browser/autofill/form_structure.cc
index 36eaf6931b895608b0945f489cb38b9e4674d61b..8ed159089349ad2a60c67a925254912aa3424af4 100644
--- a/chrome/browser/autofill/form_structure.cc
+++ b/chrome/browser/autofill/form_structure.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/basictypes.h"
+#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/sha1.h"
@@ -15,6 +16,7 @@
#include "base/stringprintf.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/browser/autofill/autofill_metrics.h"
#include "chrome/browser/autofill/autofill_type.h"
#include "chrome/browser/autofill/autofill_xml_parser.h"
@@ -507,6 +509,12 @@ std::string FormStructure::FormSignature() const {
}
bool FormStructure::IsAutofillable(bool require_method_post) const {
+ // TODO(ramankk): Remove this check once we have better way of identifying the
+ // cases to trigger experimental form filling.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableExperimentalFormFilling))
+ return true;
+
if (autofill_count() < kRequiredFillableFields)
return false;
@@ -524,6 +532,12 @@ void FormStructure::UpdateAutofillCount() {
}
bool FormStructure::ShouldBeParsed(bool require_method_post) const {
+ // TODO(ramankk): Remove this check once we have better way of identifying the
+ // cases to trigger experimental form filling.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableExperimentalFormFilling))
+ return true;
+
if (field_count() < kRequiredFillableFields)
return false;

Powered by Google App Engine
This is Rietveld 408576698