diff options
author | isherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-30 23:00:45 +0000 |
---|---|---|
committer | isherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-30 23:00:45 +0000 |
commit | f538b1eff85742494299708cfde8cd7795f26005 (patch) | |
tree | 5bcd2fc201911bab8f7f29dbb99dc020a3f41808 /third_party | |
parent | 8bce7075c2ef7334f3e624b41570123c4f29e6a8 (diff) | |
download | chromium_src-f538b1eff85742494299708cfde8cd7795f26005.zip chromium_src-f538b1eff85742494299708cfde8cd7795f26005.tar.gz chromium_src-f538b1eff85742494299708cfde8cd7795f26005.tar.bz2 |
Revert 112319 - Revert 112305 - Pull the phone library directly. Delete old version.
TEST=unit-tests
BUG=105577
Review URL: http://codereview.chromium.org/8736001
TBR=georgey@chromium.org
Review URL: http://codereview.chromium.org/8759004
TBR=isherman@chromium.org
Review URL: http://codereview.chromium.org/8757005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112324 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/libphonenumber/README.chromium | 22 | ||||
-rw-r--r-- | third_party/libphonenumber/libphonenumber.gyp | 64 | ||||
-rw-r--r-- | third_party/libphonenumber/patches/version277a.patch | 21 |
3 files changed, 48 insertions, 59 deletions
diff --git a/third_party/libphonenumber/README.chromium b/third_party/libphonenumber/README.chromium index e662452..94700e8 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: 277 +Revision: 403 Security Critical: yes This directory contains the source code of International Phone Number Library @@ -17,15 +17,13 @@ This library depends on Additional files, not in the original library: libphonenumber.gyp README.chromium + src/LICENSE # Taken from http://code.google.com/p/libphonenumber. + src/phonenumber_api.h -Until the changes are upstreamed library is included directly, with patches -in patches/version277.patch and patches/version277a.patch applied. - -The folders included in our repository for now are - cpp/ - resource/ - -TODO(georgey) : remove following lines when updated to version after 186 - cpp/src/phonelibutil.cc made icu::Transliteration member of PhoneUtil - to improve performance, Not needed in recent versions. - +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 +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. diff --git a/third_party/libphonenumber/libphonenumber.gyp b/third_party/libphonenumber/libphonenumber.gyp index 92415da..d5a4bf5 100644 --- a/third_party/libphonenumber/libphonenumber.gyp +++ b/third_party/libphonenumber/libphonenumber.gyp @@ -8,15 +8,17 @@ '../..', # 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. - 'cpp/src', + 'src', + 'src/test', # The libphonenumber source (and test code) expects the - # generated protocol headers to be available with no include - # path, e.g. #include "foo.pb.h". + # generated protocol headers to be available with "phonenumbers" include + # path, e.g. #include "phonenumbers/foo.pb.h". '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber', ], 'defines': [ 'USE_HASH_MAP=1', 'USE_GOOGLE_BASE=1', + 'USE_ICU_REGEXP=1', ], }, 'includes': [ @@ -32,32 +34,36 @@ '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', ], 'sources': [ - # 'chrome/regexp_adapter_icuregexp.cc', - 'cpp/src/default_logger.cc', - 'cpp/src/lite_metadata.cc', - 'cpp/src/logger.cc', - 'cpp/src/phonenumber.cc', - 'cpp/src/phonenumberutil.cc', - 'cpp/src/regexp_adapter_icu.cc', - 'cpp/src/regexp_cache.cc', - 'cpp/src/stringutil.cc', - 'cpp/src/utf/rune.c', - 'cpp/src/utf/unicodetext.cc', - 'cpp/src/utf/unilib.cc', - 'resources/phonemetadata.proto', - 'resources/phonenumber.proto', + 'src/phonenumbers/asyoutypeformatter.cc', + 'src/phonenumbers/default_logger.cc', + # Comment next line and uncomment the line after, if complete metadata + # (with examples) is needed. + 'src/phonenumbers/lite_metadata.cc', + #'src/phonenumbers/metadata.cc', + 'src/phonenumbers/logger.cc', + 'src/phonenumbers/phonenumber.cc', + # The following two files should be added on 'as needed' basis. + #'src/phonenumbers/phonenumbermatch.cc', + #'src/phonenumbers/phonenumbermatcher.cc', + 'src/phonenumbers/phonenumberutil.cc', + 'src/phonenumbers/regexp_adapter_icu.cc', + 'src/phonenumbers/regexp_cache.cc', + 'src/phonenumbers/stringutil.cc', + 'src/phonenumbers/unicodestring.cc', + 'src/phonenumbers/utf/rune.c', + 'src/phonenumbers/utf/unicodetext.cc', + 'src/phonenumbers/utf/unilib.cc', + 'src/resources/phonemetadata.proto', + 'src/resources/phonenumber.proto', ], 'direct_dependent_settings': { 'include_dirs': [ - # The libphonenumber headers expect generated protocol headers - # to be available with no include path, e.g. #include - # "foo.pb.h". '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber', ], }, 'variables': { - 'proto_in_dir': 'resources', - 'proto_out_dir': 'third_party/libphonenumber', + 'proto_in_dir': 'src/resources', + 'proto_out_dir': 'third_party/libphonenumber/phonenumbers', }, 'includes': [ '../../build/protoc.gypi' ], 'conditions': [ @@ -73,10 +79,16 @@ 'type': 'executable', 'sources': [ '../../base/test/run_all_unittests.cc', - 'cpp/src/phonenumberutil_test.cc', - 'cpp/src/regexp_adapter_test.cc', - 'cpp/src/stringutil_test.cc', - 'cpp/src/test_metadata.cc', + 'src/phonenumbers/test_metadata.cc', + 'src/test/phonenumbers/asyoutypeformatter_test.cc', + # The following two files should be added on 'as needed' basis. + #'src/test/phonenumbers/phonenumbermatch_test.cc', + #'src/test/phonenumbers/phonenumbermatcher_test.cc', + 'src/test/phonenumbers/phonenumberutil_test.cc', + 'src/test/phonenumbers/regexp_adapter_test.cc', + 'src/test/phonenumbers/stringutil_test.cc', + 'src/test/phonenumbers/test_util.cc', + 'src/test/phonenumbers/unicodestring_test.cc', ], 'dependencies': [ '../icu/icu.gyp:icui18n', diff --git a/third_party/libphonenumber/patches/version277a.patch b/third_party/libphonenumber/patches/version277a.patch deleted file mode 100644 index 8757107..0000000 --- a/third_party/libphonenumber/patches/version277a.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Naur src-orig/default_logger.h src/default_logger.h ---- src-orig/default_logger.h 2011-07-02 16:27:58.000000000 -0700 -+++ src/default_logger.h 2011-07-02 16:28:29.000000000 -0700 -@@ -17,6 +17,8 @@ - #ifndef I18N_PHONENUMBERS_DEFAULT_LOGGER_H_ - #define I18N_PHONENUMBERS_DEFAULT_LOGGER_H_ - -+#include <stdio.h> -+ - #include <string> - - #include "logger.h" -@@ -45,7 +47,7 @@ - struct ConvertToString<int> { - static inline string DoWork(const int& n) { - char buffer[16]; -- std::snprintf(buffer, sizeof(buffer), "%d", n); -+ snprintf(buffer, sizeof(buffer), "%d", n); - return string(buffer); - } - }; |