• rouslan@chromium.org's avatar
    [rac] Download all rules for a country code in libaddressinput. · edf37bf1
    rouslan@chromium.org authored
    This patch enables downloading all rules for a country code. The rules are
    organized into a Ruleset tree, where nodes contain region-wide rules,
    language-specific rules, and Rulesets for the sub-regions.
    
    For example, the country code of Canada is "CA". The Ruleset for "CA"
    contains the general validation rules for Canada in the default language
    of the country, which is English, or "en".
    
    One of the child nodes of "CA" is a Rule for "fr" language. This Rule
    contains the general validation rules for Canada in the French language.
    
    The rest of the child nodes of "CA" are the Ruleset objects for all of the
    Canada's provinces. For example, there's a Ruleset for "BC" for British
    Columbia.
    
    Example of a Ruleset for Canada and some of its provinces:
    
                      CA-->fr
                      |
    -------------------------------------
    |        |        |        |        |
    v        v        v        v        v
    AB-->fr  BC-->fr  MB-->fr  NB-->fr  NL-->fr
    
    BUG=327046
    
    Review URL: https://codereview.chromium.org/109323011
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243754 0039d316-1c4b-4281-b951-d872f2087c98
    edf37bf1
ruleset.h 2.5 KB