summaryrefslogtreecommitdiff
path: root/chromium/components/autofill/core/browser/geo/autofill_country.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/autofill/core/browser/geo/autofill_country.h')
-rw-r--r--chromium/components/autofill/core/browser/geo/autofill_country.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/chromium/components/autofill/core/browser/geo/autofill_country.h b/chromium/components/autofill/core/browser/geo/autofill_country.h
index 002af082e40..fc16ef008d3 100644
--- a/chromium/components/autofill/core/browser/geo/autofill_country.h
+++ b/chromium/components/autofill/core/browser/geo/autofill_country.h
@@ -14,6 +14,8 @@
namespace autofill {
+class LogBuffer;
+
// Stores data associated with a country. Strings are localized to the app
// locale.
class AutofillCountry {
@@ -47,6 +49,17 @@ class AutofillCountry {
return (address_required_fields_ & ADDRESS_REQUIRES_ZIP) != 0;
}
+ // An address line1 is expected in a complete address for this country.
+ bool requires_line1() const {
+ return (address_required_fields_ & ADDRESS_REQUIRES_LINE1) != 0;
+ }
+
+ // True if a complete address is expected to either contain a state or a ZIP
+ // code. Not true if the address explicitly needs both.
+ bool requires_zip_or_state() const {
+ return (address_required_fields_ & ADDRESS_REQUIRES_ZIP_OR_STATE) != 0;
+ }
+
private:
AutofillCountry(const std::string& country_code,
const base::string16& name,
@@ -71,6 +84,8 @@ class AutofillCountry {
DISALLOW_COPY_AND_ASSIGN(AutofillCountry);
};
+LogBuffer& operator<<(LogBuffer& buffer, const AutofillCountry& country);
+
} // namespace autofill
#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_GEO_AUTOFILL_COUNTRY_H_