summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 20:34:45 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 20:34:45 +0000
commit947e3bef0848003abd87afb93a90f4f6637549d3 (patch)
treedfefe0fec2817d7e9c35067a4b237ecf525bc3ba
parent0df236b53b7ff5445b835ec3e02f39e2a4116282 (diff)
downloadchromium_src-947e3bef0848003abd87afb93a90f4f6637549d3.zip
chromium_src-947e3bef0848003abd87afb93a90f4f6637549d3.tar.gz
chromium_src-947e3bef0848003abd87afb93a90f4f6637549d3.tar.bz2
AutoFillField::set_heuristic_type: avoid redundant logic in DCHECK
Just a bit of code cleanup BUG=none TEST=none Review URL: http://codereview.chromium.org/5241001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69048 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/autofill/autofill_field.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/autofill/autofill_field.cc b/chrome/browser/autofill/autofill_field.cc
index cd41b65..74a6368 100644
--- a/chrome/browser/autofill/autofill_field.cc
+++ b/chrome/browser/autofill/autofill_field.cc
@@ -41,11 +41,14 @@ AutoFillField::AutoFillField(const webkit_glue::FormField& field,
AutoFillField::~AutoFillField() {}
void AutoFillField::set_heuristic_type(const AutoFillFieldType& type) {
- DCHECK(type >= 0 && type < MAX_VALID_FIELD_TYPE);
- if (type >= 0 && type < MAX_VALID_FIELD_TYPE)
+ if (type >= 0 && type < MAX_VALID_FIELD_TYPE) {
heuristic_type_ = type;
- else
+ } else {
+ NOTREACHED();
+ // This case should not be reachable; but since this has potential
+ // implications on data uploaded to the server, better safe than sorry.
heuristic_type_ = UNKNOWN_TYPE;
+ }
}
AutoFillFieldType AutoFillField::type() const {