diff options
author | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-01 14:46:20 +0000 |
---|---|---|
committer | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-01 14:46:20 +0000 |
commit | 0492293e986ea576d4962aba791b32d22702a34c (patch) | |
tree | 656f3567504d7ff3713bcd0ad2534e42d67d2b80 /third_party | |
parent | 30d355703950b86eea56386e84d900cdb9294b25 (diff) | |
download | chromium_src-0492293e986ea576d4962aba791b32d22702a34c.zip chromium_src-0492293e986ea576d4962aba791b32d22702a34c.tar.gz chromium_src-0492293e986ea576d4962aba791b32d22702a34c.tar.bz2 |
rAc: use libaddressinput to validate international addresses.
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
Diffstat (limited to 'third_party')
3 files changed, 8 insertions, 4 deletions
diff --git a/third_party/libaddressinput/chromium/cpp/src/country_rules_aggregator.cc b/third_party/libaddressinput/chromium/cpp/src/country_rules_aggregator.cc index 8135b3b..bb32cd3 100644 --- a/third_party/libaddressinput/chromium/cpp/src/country_rules_aggregator.cc +++ b/third_party/libaddressinput/chromium/cpp/src/country_rules_aggregator.cc @@ -48,7 +48,7 @@ void CountryRulesAggregator::AggregateRules(const std::string& country_code, scoped_ptr<Callback> rules_ready) { Reset(); country_code_ = country_code; - rules_ready_.reset(rules_ready.release()); + rules_ready_ = rules_ready.Pass(); // Key construction: // https://code.google.com/p/libaddressinput/wiki/AddressValidationMetadata diff --git a/third_party/libaddressinput/chromium/cpp/src/retriever.h b/third_party/libaddressinput/chromium/cpp/src/retriever.h index 469f66b..3c24d24 100644 --- a/third_party/libaddressinput/chromium/cpp/src/retriever.h +++ b/third_party/libaddressinput/chromium/cpp/src/retriever.h @@ -31,10 +31,10 @@ class Downloader; class Storage; // Manages downloading data and caching it locally. Sample usage: -// Storage* storage = ...; -// Downloader* downloader = ...; +// scoped_ptr<Downloader> downloader(new Downloader); +// scoped_ptr<Storage> storage(new Storage); // Retriever retriever("https://i18napis.appspot.com/ssl-aggregate-address/", -// downloader, storage); +// downloader.Pass(), storage.Pass()); // retriever.Retrieve("data/CA/AB--fr", // BuildCallback(this, &MyClass::OnDataRetrieved)); class Retriever { diff --git a/third_party/libaddressinput/libaddressinput.gyp b/third_party/libaddressinput/libaddressinput.gyp index e9819d8..43df87d 100644 --- a/third_party/libaddressinput/libaddressinput.gyp +++ b/third_party/libaddressinput/libaddressinput.gyp @@ -103,6 +103,10 @@ '<(DEPTH)/base/base.gyp:base', ], 'direct_dependent_settings': { + 'defines': [ + 'CUSTOM_BASICTYPES="base/basictypes.h"', + 'CUSTOM_SCOPED_PTR="base/memory/scoped_ptr.h"', + ], 'include_dirs': [ '<(libaddressinput_dir)/cpp/include/', ], |