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

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

Issue 5241001: AutoFillField::set_heuristic_type: don't try to handle a DCHECK failure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Slightly clearer then Created 10 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_field.cc
diff --git a/chrome/browser/autofill/autofill_field.cc b/chrome/browser/autofill/autofill_field.cc
index cd41b6560fdcd726a7fe326b5e1629fa6f1fa1e5..74a6368d66f72ab05b3ebe8d31a0f060dacce10e 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 {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698