// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_DATA_MODEL_AUTOFILL_STRUCTURED_ADDRESS_H_ #define COMPONENTS_AUTOFILL_CORE_BROWSER_DATA_MODEL_AUTOFILL_STRUCTURED_ADDRESS_H_ #include <string> #include <vector> #include "base/feature_list.h" #include "components/autofill/core/browser/data_model/autofill_feature_guarded_address_component.h" #include "components/autofill/core/browser/data_model/autofill_structured_address_component.h" #include "components/autofill/core/browser/field_types.h" namespace autofill { // This class reimplements the ValueForComparison method to apply a // country-specific rewriter to the normalized value. class AddressComponentWithRewriter : public AddressComponent { … }; // The name of the street. class StreetNameNode : public AddressComponent { … }; // The house number. It also contains the subunit descriptor, e.g. the 'a' in // '73a'. class HouseNumberNode : public AddressComponent { … }; // Contains the specific location in the street (e.g. street name and house // number info.) class StreetLocationNode : public AddressComponent { … }; // The floor the apartment is located in. class FloorNode : public AddressComponent { … }; // The number of the apartment. class ApartmentNode : public AddressComponent { … }; // The SubPremise normally contains the floor and the apartment number. class SubPremiseNode : public AddressComponent { … }; // Stores the landmark of an address profile. class LandmarkNode : public AddressComponent { … }; // Stores the streets intersection of an address profile. class BetweenStreetsNode : public AddressComponent { … }; class BetweenStreets1Node : public AddressComponent { … }; class BetweenStreets2Node : public AddressComponent { … }; // Stores administrative area level 2. A sub-division of a state, e.g. a // Municipio in Brazil or Mexico. class AdminLevel2Node : public AddressComponent { … }; // Stores address overflow fields in countries that assign a fixed meaning to // overflow fields, meaning that forms follow a consistent structure that is // typically identical across domains while also providing an option for an // overflow field. class AddressOverflowNode : public AddressComponent { … }; class AddressOverflowAndLandmarkNode : public AddressComponent { … }; class BetweenStreetsOrLandmarkNode : public AddressComponent { … }; // The StreetAddress incorporates all the information specifically related to // the street address (e.g. street location. between streets, subpremise, etc). // This class inherits from AddressComponentWithRewriter to implement // rewriting values for comparison. class StreetAddressNode : public AddressComponentWithRewriter { … }; // Stores the country code of an address profile. class CountryCodeNode : public AddressComponent { … }; // Stores the city of an address. class DependentLocalityNode : public AddressComponent { … }; // Stores the city of an address. class CityNode : public AddressComponent { … }; // Stores the state of an address. // This class inherits from AddressComponentWithRewriter to implement // rewriting values for comparison. class StateNode : public AddressComponentWithRewriter { … }; // Stores the postal code of an address. // This class inherits from AddressComponentWithRewriter to implement // rewriting values for comparison. class PostalCodeNode : public AddressComponentWithRewriter { … }; // Stores the sorting code. class SortingCodeNode : public AddressComponent { … }; // Stores the overall Address that contains every other address related node. class AddressNode : public AddressComponent { … }; } // namespace autofill #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_DATA_MODEL_AUTOFILL_STRUCTURED_ADDRESS_H_