aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-06-25Merge from Chromium at DEPS revision 278856android-wear-5.0.0_r1android-l-preview_r2android-cts-5.0_r9android-cts-5.0_r8android-cts-5.0_r7android-cts-5.0_r6android-cts-5.0_r5android-cts-5.0_r4android-cts-5.0_r3android-5.0.2_r3android-5.0.2_r1android-5.0.1_r1android-5.0.0_r7android-5.0.0_r6android-5.0.0_r5.1android-5.0.0_r5android-5.0.0_r4android-5.0.0_r3android-5.0.0_r2android-5.0.0_r1lollipop-wear-releaselollipop-releaselollipop-devlollipop-cts-releasel-previewTorne (Richard Coles)
This commit was generated by merge_to_master.py. Change-Id: I283eef90c15d40ea8cd6290f12094fc152a2c45e
2014-06-20Merge from Chromium at DEPS revision 278205Torne (Richard Coles)
This commit was generated by merge_to_master.py. Change-Id: I54dfe87045260dd68161b9e69e4e6d099ec06849
2014-06-19Merge third_party/libaddressinput/src from ↵Android Chromium Automerger
https://chromium.googlesource.com/external/libaddressinput.git at 796b9d8aba7b058c1d69b08dfc0056ecb1f52c14 This commit was generated by merge_from_chromium.py. Change-Id: Ie6d172946a49f4596470cd5e2799afd78b562f03
2014-06-18Fix compile in Chromium with clang address sanitizer.rouslan@chromium.org
When building with GYP_DEFINES="clang=1 asan=1" in Chromium, the compiler assumes that std::map<std::string, const Rule*>::iterator uses std::less<> instead of IndexLess comparator. This patch fixes the problem by using IndexMap::iterator instead. TBR=roubert@google.com Review URL: https://codereview.appspot.com/105300048 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@293 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-18Pass UI language to BuildComponents().rouslan@chromium.org
This patch removes language_tag parameter from Localization::SetGetter(), because it's not required for retrieving strings. BuildComponents() now requires a |ui_language_tag| parameter. R=lararennie@google.com Review URL: https://codereview.appspot.com/109940045 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@292 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-18Bugfix: PreloadSupplier drops language tags when building index.roubert@google.com
TBR=rouslan@chromium.org BUG= Review URL: https://codereview.appspot.com/101350044 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@291 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-18More natural language friendly string matching in PreloadSupplier.roubert@google.com
This is done by updating the StringCompare helper class to also provide a comparison method that conforms to the STL requirements for less<> predicates, and then wrapping this as an STL predicate. (A portable default implementation of this is done through "clever" use of RE2 to get UTF-8 capable string comparison. Users of the library can override this with better/faster implementations.) This will make PreloadSupplier able to match "ZÜRICH" and "Zürich". Yay! ;-) R=rouslan@chromium.org BUG= Review URL: https://codereview.appspot.com/101340044 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@290 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-18Adapt lru_cache_using_std.h for use in libaddressinput.roubert@google.com
- Add comment about where the file originally came from. - Hard-code map type, to not require C++11. - Standardize include guards. - Remove trailing whitespace. R=rouslan@chromium.org BUG= Review URL: https://codereview.appspot.com/109040045 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@289 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-18Add Tim Day's lru_cache_using_std.h to cpp/src/util.roubert@google.com
https://bitbucket.org/timday/lru_cache/src/497822a492a8/include/lru_cache_using_std.h R=rouslan@chromium.org BUG= Review URL: https://codereview.appspot.com/101350043 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@288 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-18Fix a leak in ValidationTaskTest.rouslan@chromium.org
TBR=roubert@google.com Review URL: https://codereview.appspot.com/109070043 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@287 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-17Add lookup table in PreloadSupplier for natural and Latin script names.roubert@google.com
Normally the address metadata server takes care of mapping from natural language names to metadata IDs (eg. "São Paulo" -> "SP") and from Latin script names to local script names (eg. "Tokushima" -> "徳島県"). As the PreloadSupplier doesn't contact the metadata server upon each Supply() request, it does instead need to have an internal lookup table that contains such mappings in order to be possible to use to validate addresses that use natural language names or Latin script names. R=rouslan@chromium.org BUG= Review URL: https://codereview.appspot.com/105920047 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@286 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-17Show only one example of postal code in error messages.rouslan@chromium.org
This patch changes error messages for postal codes to show at most one example of a valid postal code. This behavior resembles other implementations more closely. R=keghani@google.com Review URL: https://codereview.appspot.com/107160044 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@285 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-17Add a comma between city and state in format for US.rouslan@chromium.org
Human-readable addresses in US have a comma between city and state, although machine-readable addresses do not require the comma. R=lararennie@google.com Review URL: https://codereview.appspot.com/109040043 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@284 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-17Update svn:externals for rapidjson to use the GitHub repository instead.roubert@google.com
According to the message now shown on code.google.com, the rapidjson source code repository has been moved to GitHub: https://code.google.com/p/rapidjson/ https://github.com/miloyip/rapidjson (Today, both repositories contain the same source tree, but the repository at code.google.com isn't expected to be kept updated, at least not in a timely fashion, in the future.) git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@283 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-17Merge third_party/libaddressinput/src from ↵Android Chromium Automerger
https://chromium.googlesource.com/external/libaddressinput.git at 128ae075bbf50996c1068740746f27430f89136d This commit was generated by merge_from_chromium.py. Change-Id: I2f62550bd34863534a2ad5e229f931fa6aec7546
2014-06-16Change the Downloader and Storage APIs to use heap-allocated objects.roubert@google.com
For use with multithreaded implementations of Downloader and Storage, it is desirable to work with heap-allocated objects that can easily be passed between threads (instead of having to work with thread-local objects that need to be copied between threads). R=rouslan@chromium.org git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@282 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-16Make the Callback templates more generic.roubert@google.com
Instead of unconditionally adding const& to the specified types, require the user of the Callback templates to specify it. This makes it possible to use these same templates also for other types. Now, const int& is replaced with just plain int. Later, this will be used to replace const std::string& with std::string*. R=rouslan@chromium.org git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@281 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-16Merge third_party/libaddressinput/src from ↵Android Chromium Automerger
https://chromium.googlesource.com/external/libaddressinput.git at 1cc079798198a961e938b74e573588986afdca3b This commit was generated by merge_from_chromium.py. Change-Id: Ief2f36f1e9dfbac8319d3500b0c000685c9e345d
2014-06-13Fix a bug with the postal code validator where a pattern with a '|' can ↵davinci@google.com
match any part of a postal code, when it is intended to match only the prefix. git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@280 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-12Comment update to formatter.lararennie@google.com
git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@279 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-12Initial empty repositoryGeoff Mendal
2014-06-11Update post url for NL.shaopengjia@google.com
Review URL: https://codereview.appspot.com/106970043 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@278 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-11Updating RegionDataConstants - removing dir/fmtCharsets (not used), ↵lararennie@google.com
adding/fixing formatting for Kosovo, Thailand, China etc. git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@277 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-11Remove blank line in codereview.settings.shaopengjia@google.com
git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@276 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-11Fix invalid syntax in codereview.settings.shaopengjia@google.com
git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@275 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-11Adding setting file to enable gcl to be used in the repository.shaopengjia@google.com
git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@274 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-10Update to Turkish formatting data/fieldslararennie@google.com
git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@273 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-10Updating region_data_constants.cc with the correct postal URL for AR and a ↵lararennie@google.com
format change cfor zh-Latn. git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@272 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-09Add build to svn:ignore.roubert@df.lth.se
git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@271 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-09Add .gradle to svn:ignore.roubert@df.lth.se
git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@270 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-09Add Gradle build files for libaddressinput.roubert@df.lth.se
This is the New Build System for Android: http://tools.android.com/tech-docs/new-build-system git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@269 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-06Add a comment about valid language tags in address_input_helper.h.rouslan@chromium.org
R=lararennie@google.com Review URL: https://codereview.appspot.com/103070043 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@268 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-05RuleHierarchy should be forward-declared as a struct.rouslan@chromium.org
Some compilers do not like a forward declaration: class RuleHierarchy; ..followed by the actual declaration: struct RuleHierarchy {...}; TBR=roubert@google.com Review URL: https://codereview.appspot.com/109740044 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@267 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-05Point to the new location of RE2 library.rouslan@chromium.org
The http://packages.debian.org/experimental/libre2-dev URL is no longer valid. You now can get the RE2 library from: http://packages.ubuntu.com/utopic/libre2-dev. TBR=roubert@google.com Review URL: https://codereview.appspot.com/103910045 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@266 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-04Make IsFieldRequired and IsFieldUsed always return true for COUNTRY.roubert@google.com
Author: davinci@google.com git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@265 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-04Break implementation of MockDownloader out into a stand-alone class.roubert@google.com
R=lararennie@google.com BUG= Review URL: https://codereview.appspot.com/105790043 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@264 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-04Rename Synonyms class to AddressNormalizerlararennie@google.com
git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@263 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-03Functionality to guess fields in an address based on existing data. Adds a ↵lararennie@google.com
post-code if possible, otherwise if one is present, tries to fill in state, locality and dep-locality. git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@262 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-06-03Change the methods in validation_task.cc to use the required and used fields ↵roubert@google.com
information from statically linked region_data_constants. git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@261 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-05-30Break implementation out of the public OndemandSupplier interface.roubert@google.com
The current situation, where OndemandSupplier has a nested class which is a RuleHierarchy, is an artefact from the time when OndemandSupplier was an internal interface (r244). It does no longer make any sense. This change makes Supplier::RuleHierarchy a simple struct and moves all the implementation details into an internal class OndemandSupplyTask. R=rouslan@chromium.org BUG= Review URL: https://codereview.appspot.com/101960046 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@260 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-05-30Remove hardcoded STREET_ADDRESS in AddressData::IsRepeatedFieldValue().roubert@google.com
Instead of this particular field hardcoded, look the field up in the kVectorStringField table to see whether GetRepeatedFieldValue() would succeed for the field requested. R=rouslan@chromium.org BUG= Review URL: https://codereview.appspot.com/101960045 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@259 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-05-29Add more tests for RegionDataBuilder.rouslan@chromium.org
This patch adds more tests for RegionDataBuilder to verify the behavior as it's documented in the comment for RegionDataBuilder::Build() method. TBR=roubert@google.com Review URL: https://codereview.appspot.com/101990043 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@258 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-05-28Update external GRIT dependency to r168.roubert@google.com
git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@257 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-05-28Separate region data builder from preload supplier.rouslan@chromium.org
R=roubert@google.com Review URL: https://codereview.appspot.com/101830044 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@256 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-05-28Add feature for selecting basictypes.h implementation at build time.roubert@google.com
If building libaddressinput in an environment where there already is another implementation of the basictypes.h header file (like in Chromium), then this change will make it possible to pass the command line flag -DI18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1 to the compiler and provide a file named basictypes_override.h, in a location where the compiler will look for it, which provides the desired implementation. This also makes it possible to remove the work-around for basictypes.h in re2ptr.h as any environment where re2.h includes its own basictypes.h now will be able to have all of libaddressinput use that implementation. R=rouslan@chromium.org BUG= Review URL: https://codereview.appspot.com/99490045 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@255 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-05-28Remove extra whitespace from messages.rouslan@chromium.org
This patch removes the extra whitespace from English strings. After this patch lands, Chrome can pull in the strings and start the translation process. R=lararennie@google.com, roubert@google.com Review URL: https://codereview.appspot.com/92660044 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@254 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-05-27Remove deprecated AddressValidator constructor.roubert@google.com
R=rouslan@chromium.org BUG= Review URL: https://codereview.appspot.com/101760044 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@253 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-05-27Address outstanding comments from codereview.appspot.com/100630043.keghani@google.com
git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@252 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-05-26Delete unused call to ChooseBestAddressLanguage().roubert@google.com
This has been left over from an earlier version of this code, in which this was used to set region_address.language_code (which is now left unset). R=rouslan@chromium.org BUG= Review URL: https://codereview.appspot.com/101730045 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@251 38ededc0-08b8-5190-f2ac-b31f878777ad
2014-05-23Synonym resolution.rouslan@chromium.org
R=roubert@google.com Review URL: https://codereview.appspot.com/98460048 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@250 38ededc0-08b8-5190-f2ac-b31f878777ad