diff options
author | pliard@chromium.org <pliard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-25 16:56:40 +0000 |
---|---|---|
committer | pliard@chromium.org <pliard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-25 16:56:40 +0000 |
commit | 5a2ad3b480d692135a082c844eaa7a2ffb1d31e4 (patch) | |
tree | 72f2b96da59f450d580dd3ac8ab18351df8b9199 /third_party/libphonenumber | |
parent | 8bbaeb2a89c017617999aa02351f7660ba33ffb5 (diff) | |
download | chromium_src-5a2ad3b480d692135a082c844eaa7a2ffb1d31e4.zip chromium_src-5a2ad3b480d692135a082c844eaa7a2ffb1d31e4.tar.gz chromium_src-5a2ad3b480d692135a082c844eaa7a2ffb1d31e4.tar.bz2 |
Roll libphonenumber 456:584
This is needed to remove libphonenumber's dependency on Chromium's base/.
BUG=236272
R=avi@chromium.org, brettw@chromium.org, bulach@chromium.org, isherman@chromium.org
Review URL: https://codereview.chromium.org/14855002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208510 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libphonenumber')
-rw-r--r-- | third_party/libphonenumber/OWNERS | 2 | ||||
-rw-r--r-- | third_party/libphonenumber/README.chromium | 15 | ||||
-rw-r--r-- | third_party/libphonenumber/libphonenumber.gyp | 34 |
3 files changed, 36 insertions, 15 deletions
diff --git a/third_party/libphonenumber/OWNERS b/third_party/libphonenumber/OWNERS new file mode 100644 index 0000000..5d7d63c --- /dev/null +++ b/third_party/libphonenumber/OWNERS @@ -0,0 +1,2 @@ +isherman@chromium.org +pliard@chromium.org
\ No newline at end of file diff --git a/third_party/libphonenumber/README.chromium b/third_party/libphonenumber/README.chromium index a96da88..9ff70a5 100644 --- a/third_party/libphonenumber/README.chromium +++ b/third_party/libphonenumber/README.chromium @@ -2,7 +2,7 @@ Name: International Phone Number Library Short Name: libphonenumber URL: http://libphonenumber.googlecode.com/svn/trunk/ Version: unknown -Revision: 456 +Revision: 584 License: Apache 2.0 License File: src/LICENSE Security Critical: yes @@ -11,10 +11,9 @@ This directory contains the source code of International Phone Number Library for C/C++. This library depends on -1. base/ for types, scoped_ptr's, etc. -2. third_party/icu for internationalisation, UTF8-16-32 conversion and regular - expressions. -3. third_party/protobuf Lite version. +- third_party/icu for internationalisation, UTF8-16-32 conversion and regular + expressions. +- third_party/protobuf Lite version. Additional files, not in the original library: libphonenumber.gyp @@ -24,8 +23,12 @@ Additional files, not in the original library: The library is mapped through the DEPS file into src/ folder. To update: 1. Get the latest version number from - http://code.google.com/p/libphonenumber/source/list + http://code.google.com/p/libphonenumber/source/list 2. Locally update this file and DEPS. 3. run 'gclient sync' 4. Adjust libphonenumber.gyp if necessary. 5. Verify that all compiles and all of the tests are successfull. + +WARNING: This library is only thread-safe on POSIX. This means that +PhoneNumberUtil and the other singletons should be accessed from a single +thread. diff --git a/third_party/libphonenumber/libphonenumber.gyp b/third_party/libphonenumber/libphonenumber.gyp index 89d265e..f002790 100644 --- a/third_party/libphonenumber/libphonenumber.gyp +++ b/third_party/libphonenumber/libphonenumber.gyp @@ -5,9 +5,6 @@ { 'target_defaults': { 'include_dirs': [ - '../..', # add it first, so src/base headers are used instead of the ones - # brought with the library as cc files would be taken from the - # main chrome tree as well. 'src', 'src/test', # The libphonenumber source (and test code) expects the @@ -16,9 +13,20 @@ '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber', ], 'defines': [ - 'USE_HASH_MAP=1', - 'USE_GOOGLE_BASE=1', - 'USE_ICU_REGEXP=1', + 'I18N_PHONENUMBERS_USE_ICU_REGEXP=1', + ], + 'conditions': [ + # libphonenumber can only be thread-safe on POSIX platforms. This is ok + # since Android is the only Chromium port that requires thread-safety. + # It uses the PhoneNumberUtil singleton in renderer threads as opposed to + # other platforms that only use it in the browser process (on a single + # thread). Note that any unsafe use of the library would be caught by a + # DCHECK. + ['OS != "android"', { + 'defines': [ + 'I18N_PHONENUMBERS_NO_THREAD_SAFETY=1', + ], + }], ], }, 'includes': [ @@ -30,14 +38,13 @@ 'target_name': 'libphonenumber_without_metadata', 'type': 'static_library', 'dependencies': [ - '../../base/base.gyp:base', - '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../icu/icu.gyp:icui18n', '../icu/icu.gyp:icuuc', '../protobuf/protobuf.gyp:protobuf_lite', ], 'sources': [ 'src/phonenumbers/asyoutypeformatter.cc', + 'src/phonenumbers/base/strings/string_piece.cc', 'src/phonenumbers/default_logger.cc', 'src/phonenumbers/logger.cc', 'src/phonenumbers/phonenumber.cc', @@ -65,6 +72,16 @@ '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber', 'src', ], + 'defines': [ + 'I18N_PHONENUMBERS_USE_ICU_REGEXP=1', + ], + 'conditions': [ + ['OS != "android"', { + 'defines': [ + 'I18N_PHONENUMBERS_NO_THREAD_SAFETY=1', + ], + }], + ], }, 'conditions': [ ['OS=="win"', { @@ -108,7 +125,6 @@ 'dependencies': [ '../icu/icu.gyp:icui18n', '../icu/icu.gyp:icuuc', - '../../base/base.gyp:base', '../../base/base.gyp:run_all_unittests', '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../../testing/gmock.gyp:gmock', |