summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/form_structure.cc
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-30 01:00:32 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-30 01:00:32 +0000
commit2ef25de7b8d13f84bbc42d71a5dc231c5edf448a (patch)
tree3b6960cbe99031c203cd9bdb0399e4cdf388964a /chrome/browser/autofill/form_structure.cc
parenta3bb6568a7a996081da62d58c81d626a64c4f309 (diff)
downloadchromium_src-2ef25de7b8d13f84bbc42d71a5dc231c5edf448a.zip
chromium_src-2ef25de7b8d13f84bbc42d71a5dc231c5edf448a.tar.gz
chromium_src-2ef25de7b8d13f84bbc42d71a5dc231c5edf448a.tar.bz2
Fix autofill detection of server data overriding heuristics.
We should check whether the field's type changed, rather than looking at whether the server type matched the heuristic type, to handle the case of NO_SERVER_DATA. BUG=64176 TEST=none Review URL: http://codereview.chromium.org/5363004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67634 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/form_structure.cc')
-rw-r--r--chrome/browser/autofill/form_structure.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/autofill/form_structure.cc b/chrome/browser/autofill/form_structure.cc
index bb9da1f..2958df6 100644
--- a/chrome/browser/autofill/form_structure.cc
+++ b/chrome/browser/autofill/form_structure.cc
@@ -235,8 +235,9 @@ void FormStructure::ParseQueryResponse(const std::string& response_xml,
if (current_type == field_types.end())
break;
+ AutoFillFieldType heuristic_type = (*field)->type();
(*field)->set_server_type(*current_type);
- if ((*field)->heuristic_type() != (*field)->server_type())
+ if (heuristic_type != (*field)->type())
query_response_overrode_heuristics = true;
AutoFillType autofill_type((*field)->type());