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

Unified Diff: third_party/libaddressinput/chromium/cpp/src/address_field_util.cc

Issue 106763007: [rac] Parse postal code formats and required fields in libaddressinput. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Omit postal code examples and URL. Created 7 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
Index: third_party/libaddressinput/chromium/cpp/src/address_field_util.cc
diff --git a/third_party/libaddressinput/chromium/cpp/src/address_field_util.cc b/third_party/libaddressinput/chromium/cpp/src/address_field_util.cc
index 553a940efd76ed748b3027594e7990bdc5fe9820..576b2a1179127acd9163cc58bfdeb2cd5f848e23 100644
--- a/third_party/libaddressinput/chromium/cpp/src/address_field_util.cc
+++ b/third_party/libaddressinput/chromium/cpp/src/address_field_util.cc
@@ -80,5 +80,17 @@ void ParseAddressFieldsFormat(const std::string& format,
}
}
+void ParseAddressFieldsRequired(const std::string& required,
+ std::vector<AddressField>* fields) {
+ assert(fields != NULL);
+ fields->clear();
+ for (std::string::const_iterator token = required.begin();
+ token != required.end(); ++token) {
+ if (IsToken(*token)) {
+ fields->push_back(ParseToken(*token));
+ }
+ }
+}
+
} // namespace addressinput
} // namespace i18n

Powered by Google App Engine
This is Rietveld 408576698