summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-18 09:31:07 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-18 09:31:07 +0000
commitd8e3698c412b4a6de46b12e1e310090ba9b58840 (patch)
tree3e2fcb2e32360d8f4e357b430fdd99ffea317ca9 /chrome/browser/autofill
parent3b96ff0c4f5732209cc2a61a9c6659724e4cb66c (diff)
downloadchromium_src-d8e3698c412b4a6de46b12e1e310090ba9b58840.zip
chromium_src-d8e3698c412b4a6de46b12e1e310090ba9b58840.tar.gz
chromium_src-d8e3698c412b4a6de46b12e1e310090ba9b58840.tar.bz2
Add DCHECK to check that autofill server never returns UNKNOWN_TYPE
BUG=64288 TEST=none Review URL: http://codereview.chromium.org/6020003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r--chrome/browser/autofill/form_structure.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/autofill/form_structure.cc b/chrome/browser/autofill/form_structure.cc
index 8ae8eb2..78431f2 100644
--- a/chrome/browser/autofill/form_structure.cc
+++ b/chrome/browser/autofill/form_structure.cc
@@ -234,6 +234,9 @@ void FormStructure::ParseQueryResponse(const std::string& response_xml,
if (current_type == field_types.end())
break;
+ // UNKNOWN_TYPE is reserved for use by the client.
+ DCHECK_NE(*current_type, UNKNOWN_TYPE);
+
AutoFillFieldType heuristic_type = (*field)->type();
(*field)->set_server_type(*current_type);
if (heuristic_type != (*field)->type())