diff options
author | isherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-18 09:31:07 +0000 |
---|---|---|
committer | isherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-18 09:31:07 +0000 |
commit | d8e3698c412b4a6de46b12e1e310090ba9b58840 (patch) | |
tree | 3e2fcb2e32360d8f4e357b430fdd99ffea317ca9 /chrome/browser/autofill | |
parent | 3b96ff0c4f5732209cc2a61a9c6659724e4cb66c (diff) | |
download | chromium_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.cc | 3 |
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()) |