Index: third_party/libaddressinput/chromium/cpp/src/rule.h |
diff --git a/third_party/libaddressinput/chromium/cpp/src/rule.h b/third_party/libaddressinput/chromium/cpp/src/rule.h |
index a11dff84ef7d28b917ae3b1d019e4ec33d612915..429dc817ef403d4dda4ba36ac8d770f6e7668771 100644 |
--- a/third_party/libaddressinput/chromium/cpp/src/rule.h |
+++ b/third_party/libaddressinput/chromium/cpp/src/rule.h |
@@ -52,6 +52,9 @@ class Rule { |
// NEWLINE extension for AddressField enum. |
const std::vector<AddressField>& GetFormat() const { return format_; } |
+ // Returns the required fields for this rule. |
+ const std::vector<AddressField>& GetRequired() const { return required_; } |
+ |
// Returns the sub-keys for this rule, which are the administrative areas of a |
// country, the localities of an administrative area, or the dependent |
// localities of a locality. For example, the rules for "US" have sub-keys of |
@@ -65,6 +68,9 @@ class Rule { |
// Returns the language code of this rule, for example "de". |
const std::string& GetLanguage() const { return language_; } |
+ // Returns the postal code format, for example "\\d{5}([ \\-]\\d{4})?". |
+ const std::string& GetPostalCodeFormat() const { return postal_code_format_; } |
+ |
// The message string identifier for admin area name. If not set, then |
// INVALID_MESSAGE_ID. |
int GetAdminAreaNameMessageId() const { return admin_area_name_message_id_; } |
@@ -77,9 +83,11 @@ class Rule { |
private: |
std::vector<AddressField> format_; |
+ std::vector<AddressField> required_; |
std::vector<std::string> sub_keys_; |
std::vector<std::string> languages_; |
std::string language_; |
+ std::string postal_code_format_; |
int admin_area_name_message_id_; |
int postal_code_name_message_id_; |