summaryrefslogtreecommitdiffstats
path: root/third_party/libaddressinput
Commit message (Collapse)AuthorAgeFilesLines
* rAc libaddressinput - disable insecure downloadsestade@chromium.org2014-02-052-4/+24
| | | | | | | | | | | another layer of protection so the security team sleeps better at night BUG=none R=dbeam@chromium.org Review URL: https://codereview.chromium.org/154303003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249120 0039d316-1c4b-4281-b951-d872f2087c98
* libaddressinput - reduce number of copies in storage class by 2estade@chromium.org2014-02-058-21/+26
| | | | | | | | | | | 1. on the way in (Put) 2. on the way out (Get) BUG=337679 Review URL: https://codereview.chromium.org/148463003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249102 0039d316-1c4b-4281-b951-d872f2087c98
* rAc: add script to scrape "require" key from i18n responses for countries.dbeam@chromium.org2014-02-041-0/+51
| | | | | | | | | | | R=estade@chromium.org BUG=331455 TEST=easier to update "require" fields NOTRY=true Review URL: https://codereview.chromium.org/132803007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248811 0039d316-1c4b-4281-b951-d872f2087c98
* rAc: Handle case where validation rules are not yet downloadedestade@chromium.org2014-02-043-19/+102
| | | | | | | | | | | Also, mark required fields regardless of whether full validation is possible. BUG=340365 R=dbeam@chromium.org Review URL: https://codereview.chromium.org/137223005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248799 0039d316-1c4b-4281-b951-d872f2087c98
* libaddressinput - one less copy when downloading dataestade@chromium.org2014-02-032-10/+55
| | | | | | | | BUG=337679 Review URL: https://codereview.chromium.org/151133002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248561 0039d316-1c4b-4281-b951-d872f2087c98
* libaddressinput - Don't make transient copies of entire JSON rule dictionariesestade@chromium.org2014-02-032-25/+70
| | | | | | | | BUG=337679 Review URL: https://codereview.chromium.org/147843008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248530 0039d316-1c4b-4281-b951-d872f2087c98
* rAc: use libaddressinput to validate international addresses.dbeam@chromium.org2014-02-013-4/+8
| | | | | | | | | | | BUG=317839 R=estade@chromium.org Based on https://codereview.chromium.org/105823007/ by Evan Stade <estade@chromium.org>. Review URL: https://codereview.chromium.org/145553009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248365 0039d316-1c4b-4281-b951-d872f2087c98
* libaddressinput - minor optimization: don't copy a couple of small stringsestade@chromium.org2014-01-301-2/+2
| | | | | | | | BUG=337679 Review URL: https://codereview.chromium.org/146243003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248061 0039d316-1c4b-4281-b951-d872f2087c98
* rAc: fix international address formatting (mostly)estade@chromium.org2014-01-301-17/+22
| | | | | | | | BUG=337998 Review URL: https://codereview.chromium.org/148273010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247918 0039d316-1c4b-4281-b951-d872f2087c98
* Add autofill:: namespace to ::i18n::addressinput::{Downloader,Storage} sodbeam@chromium.org2014-01-286-5/+29
| | | | | | | | | | | | they're not in the global namespace. BUG=317839 R=estade@chromium.org TEST=compile Review URL: https://codereview.chromium.org/148273006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247410 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Country sets the language, which sets the line separator.rouslan@chromium.org2014-01-257-156/+73
| | | | | | | | | | | | This patch changes GetCompactAddressLinesSeparator() to accept only a language code parameter. If language code is unknown, then AddressData::GuessLanguageCode() can be used to guess it. BUG=337513 Review URL: https://codereview.chromium.org/146843007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247147 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Add required fields to local libaddressinput data.rouslan@chromium.org2014-01-251-63/+149
| | | | | | | | BUG=327046 Review URL: https://codereview.chromium.org/139083004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247138 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Street address validation should not assert.rouslan@chromium.org2014-01-255-5/+89
| | | | | | | | BUG=327046 Review URL: https://codereview.chromium.org/145173009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247035 0039d316-1c4b-4281-b951-d872f2087c98
* libaddressinput: less copying of rules dataestade@chromium.org2014-01-249-91/+88
| | | | | | | | | | | - Change Downloader interface to pass scoped_ptr - Pass ownership of string through Timestamp/Checksum wrapping and unwrapping (also make it append instead of prepend) BUG=337679 Review URL: https://codereview.chromium.org/145553010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246969 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Use production URL for libaddressinput server.rouslan@chromium.org2014-01-242-4/+2
| | | | | | | | BUG=336960 Review URL: https://codereview.chromium.org/137723009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246967 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Use stale libaddressinput data if download failsrouslan@chromium.org2014-01-2410-389/+325
| | | | | | | | BUG=333396 Review URL: https://codereview.chromium.org/144353002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246860 0039d316-1c4b-4281-b951-d872f2087c98
* rAc: hide countries with no address components.dbeam@chromium.org2014-01-232-9/+6
| | | | | | | | | | R=rouslan@chromium.org BUG=336882 TEST=unit_tests, manual: invoke rAc and see no Iran Review URL: https://codereview.chromium.org/132233046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246522 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Download country code data in a single HTTP request.rouslan@chromium.org2014-01-2216-209/+375
| | | | | | | | BUG=327046 Review URL: https://codereview.chromium.org/140823005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246414 0039d316-1c4b-4281-b951-d872f2087c98
* rAc: region-aware profile completenessestade@chromium.org2014-01-224-2/+28
| | | | | | | | BUG=331455 Review URL: https://codereview.chromium.org/131743029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246265 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 245563 and 245800 which made re2 GN generated.brettw@chromium.org2014-01-221-1/+1
| | | | | | | | | | | This change keeps the BUILD file in the new location and does not resort the .gyp files to facilitate relanding. TBR=thakis BUG= Review URL: https://codereview.chromium.org/132693017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246255 0039d316-1c4b-4281-b951-d872f2087c98
* Support -Goutput_dir=blahblah in GN-GYP hybrid modejamesr@chromium.org2014-01-181-1/+1
| | | | | | | | | | | | | | This supports specifying the output_dir generator flag in the gn-generating-gyp mode. The value of the output_dir flag is mapped to a gyp variable called gyp_output_dir and a GN argument by the same name. References from gyp to gn-generated gyp files must use this variable and references from BUILD.gn files must use the gn argument. BUG=335760 TBR=brettw for build/config/BUILDCONFIG.gn (looked at in person) Review URL: https://codereview.chromium.org/142223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245800 0039d316-1c4b-4281-b951-d872f2087c98
* Update libaddressinput's US address formatestade@chromium.org2014-01-172-2/+30
| | | | | | | | BUG=333372 Review URL: https://codereview.chromium.org/135853023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245644 0039d316-1c4b-4281-b951-d872f2087c98
* Convert the re2 GYP targets to be generated by GN.brettw@chromium.org2014-01-171-1/+1
| | | | | | | | | | BUG=288991 R=bradnelson@google.com Reland of r245254 Review URL: https://codereview.chromium.org/141053003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245563 0039d316-1c4b-4281-b951-d872f2087c98
* libaddressinput: Add fallback data for US address validation.estade@chromium.org2014-01-178-8/+316
| | | | | | | | | | Useful in case the network is unavailable. BUG=333399 Review URL: https://codereview.chromium.org/137563004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245455 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Format an address for display.rouslan@chromium.org2014-01-1714-59/+653
| | | | | | | | BUG=327046 Review URL: https://codereview.chromium.org/131223004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245389 0039d316-1c4b-4281-b951-d872f2087c98
* libaddressinput string translationsestade@chromium.org2014-01-1668-277/+413
| | | | | | | | | | | - make string translations work - break libaddressinput standalone build BUG=333405 Review URL: https://codereview.chromium.org/134903003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245290 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Convert the re2 GYP targets to be generated by GN. ↵brettw@chromium.org2014-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/68853015/) Reason for revert: Broke Blink compile Original issue's description: > Convert the re2 GYP targets to be generated by GN. > > BUG=288991 > R=bradnelson@google.com > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245254 TBR=bradnelson@chromium.org,bradnelson@google.com NOTREECHECKS=true NOTRY=true BUG=288991 Review URL: https://codereview.chromium.org/141063002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245271 0039d316-1c4b-4281-b951-d872f2087c98
* Convert the re2 GYP targets to be generated by GN.brettw@chromium.org2014-01-161-1/+1
| | | | | | | | | BUG=288991 R=bradnelson@google.com Review URL: https://codereview.chromium.org/68853015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245254 0039d316-1c4b-4281-b951-d872f2087c98
* libaddressinput - merge LookupKeyUtil into Retrieverestade@chromium.org2014-01-169-192/+84
| | | | | | | | BUG=334317 Review URL: https://codereview.chromium.org/137443009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245117 0039d316-1c4b-4281-b951-d872f2087c98
* [rAc - i18n] don't call callbacks on Storage destructionestade@chromium.org2014-01-101-8/+1
| | | | | | | | | | The leaks this would have caused before should now be fixed. BUG=none Review URL: https://codereview.chromium.org/132723003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244097 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Validate an address.rouslan@chromium.org2014-01-1013-69/+388
| | | | | | | | BUG=327046 Review URL: https://codereview.chromium.org/116363003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244046 0039d316-1c4b-4281-b951-d872f2087c98
* [rAc - libaddressinput] Chrome downloader implestade@chromium.org2014-01-0913-20/+201
| | | | | | | | | | based on https://codereview.chromium.org/96323002/ by Dan Beam BUG=317838 Review URL: https://codereview.chromium.org/127223003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244003 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Download all rules for a country code in libaddressinput.rouslan@chromium.org2014-01-0914-83/+712
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [rAc - libaddressinput] slay a Helper class.estade@chromium.org2014-01-083-63/+88
| | | | | | | | | | For better memory ownership. BUG=none Review URL: https://codereview.chromium.org/115523011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243440 0039d316-1c4b-4281-b951-d872f2087c98
* [rAc - libaddressinput] slay another helper classestade@chromium.org2014-01-076-258/+1
| | | | | | | | | | remove AddressValidator; the functionality will be added to AddressValidator BUG=none Review URL: https://codereview.chromium.org/125633003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243430 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Parse postal code formats and required fields in libaddressinput.rouslan@chromium.org2014-01-0310-351/+369
| | | | | | | | | | | This patch makes the Rule object parse postal code format and required fields. This data will be used in validation logic. BUG=327046 Review URL: https://codereview.chromium.org/106763007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242951 0039d316-1c4b-4281-b951-d872f2087c98
* rAc i18n: implement storage interface for libaddressinputestade@chromium.org2014-01-028-47/+320
| | | | | | | | | BUG=325539 TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/98623005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242803 0039d316-1c4b-4281-b951-d872f2087c98
* libaddressinput: simplify json interfaceestade@chromium.org2013-12-215-62/+56
| | | | | | | | | | merge HasStringValue and GetStringValue BUG=none Review URL: https://codereview.chromium.org/113293011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242253 0039d316-1c4b-4281-b951-d872f2087c98
* libaddressinput: remove RuleRetrieverestade@chromium.org2013-12-217-239/+6
| | | | | | | | | | This removes a lot of boilerplate and some iffy memory management. AddressValidator can convert the stored string to a rule (it's only a few lines of code to do so). BUG=none Review URL: https://codereview.chromium.org/101823009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242251 0039d316-1c4b-4281-b951-d872f2087c98
* libaddressinput: convert json::Build to scoped_ptrestade@chromium.org2013-12-214-8/+14
| | | | | | | | BUG=none Review URL: https://codereview.chromium.org/104923013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242242 0039d316-1c4b-4281-b951-d872f2087c98
* Fix libaddressinput unit test.rouslan@chromium.org2013-12-211-1/+1
| | | | | | | | | TBR=estade@chromium.org BUG=327046 Review URL: https://codereview.chromium.org/120053005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242233 0039d316-1c4b-4281-b951-d872f2087c98
* libaddressinput: updates to Callbackestade@chromium.org2013-12-2018-163/+135
| | | | | | | | | | | | | | 1) rename some types and variables 2) use scoped_ptr to transfer ownership around (instead of const refs of unclear origin, which may go stale at any moment) TODO: the Helper classes need to be owned to make sure they don't run callbacks on stale objects BUG=none R=rouslan@chromium.org Review URL: https://codereview.chromium.org/117823002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242017 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Use Chrome's scoped pointers in libaddressinput.rouslan@chromium.org2013-12-1812-801/+844
| | | | | | | | BUG=327046 Review URL: https://codereview.chromium.org/109483014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241700 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Integrate STL util into libaddressinput.rouslan@chromium.org2013-12-184-13/+25
| | | | | | | | | | This patch builds STL util as part of libaddressinput. BUG=327046 Review URL: https://codereview.chromium.org/105083008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241633 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Add re2 dependency to libaddressinput.rouslan@chromium.org2013-12-184-1/+43
| | | | | | | | | | | | | | | | | | This patch adds the re2 dependency to libaddressinput. The dependency will be used to validate postal code format of addresses. The addresses are provided by the user. The format regular expressions are from: https://i18napis.appspot.com/ssl-address For example, the US postal code has the following regular expression: \\d{5}([ \\-]\\d{4})? BUG=327046 Review URL: https://codereview.chromium.org/98543010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241447 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Add STL utilities from Chrome to libaddressinput.rouslan@chromium.org2013-12-172-0/+305
| | | | | | | | | | | | | | | This patch adds STL utilities from Chrome to libaddressinput. The utilities will be used to delete heap-allocated objects inside STL containers. http://src.chromium.org/viewvc/chrome/trunk/src/base/stl_util.h?revision=221067 http://src.chromium.org/viewvc/chrome/trunk/src/base/stl_util_unittest.cc?revision=171321 BUG=327046 Review URL: https://codereview.chromium.org/116253003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241420 0039d316-1c4b-4281-b951-d872f2087c98
* libaddressinput: use scoped_ptr instead of bare pointersestade@chromium.org2013-12-1711-50/+49
| | | | | | | | | | when transferring ownership BUG=none Review URL: https://codereview.chromium.org/111103010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241367 0039d316-1c4b-4281-b951-d872f2087c98
* libaddressinput: update scoped_ptr.hestade@chromium.org2013-12-174-17/+404
| | | | | | | | | BUG=none TEST=unit tests Review URL: https://codereview.chromium.org/114863003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241217 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Parse sub-keys in validation rules of libaddressinput.rouslan@chromium.org2013-12-143-3/+94
| | | | | | | | | | | | This patch parses the "sub_keys" field in the validation rules downloaded from the server. This field will be used to identify the valid state abbreviates in US, for example. BUG=327046 Review URL: https://codereview.chromium.org/107863003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240837 0039d316-1c4b-4281-b951-d872f2087c98
* [rac] Integrate SplitString into libaddressinput.rouslan@chromium.org2013-12-135-537/+82
| | | | | | | | | | | This patch removes unnecessary functions and dependencies from SplitString and includes it in the build of libaddressinput. BUG=327046 Review URL: https://codereview.chromium.org/113493002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240735 0039d316-1c4b-4281-b951-d872f2087c98