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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_types.cc

Issue 141843005: rAc: fix some validation issues (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 years, 11 months 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 | « chrome/browser/ui/autofill/autofill_dialog_types.h ('k') | components/autofill/core/browser/validation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/autofill/autofill_dialog_types.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_types.cc b/chrome/browser/ui/autofill/autofill_dialog_types.cc
index 723a1b96c7a538df97be5284b333576f4327713b..597cea523ce18291ff24a3a2c2dd2aca73f5c676 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_types.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_types.cc
@@ -137,7 +137,14 @@ ValidityMessages::~ValidityMessages() {}
void ValidityMessages::Set(
ServerFieldType field, const ValidityMessage& message) {
- messages_.erase(field);
+ MessageMap::iterator iter = messages_.find(field);
+ if (iter != messages_.end()) {
+ if (!iter->second.text.empty())
+ return;
+
+ messages_.erase(iter);
+ }
+
messages_.insert(MessageMap::value_type(field, message));
}
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_types.h ('k') | components/autofill/core/browser/validation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698