summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormathp <mathp@chromium.org>2016-03-01 07:16:05 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-01 15:17:13 +0000
commit726584d8bde61b540cc8db7d4bb680d5fe9ebdae (patch)
tree373817a02646f38df3ce6b68ce40685c90267ef0
parenta6ba18f27713158c3e3702c21501c2af132d44a3 (diff)
downloadchromium_src-726584d8bde61b540cc8db7d4bb680d5fe9ebdae.zip
chromium_src-726584d8bde61b540cc8db7d4bb680d5fe9ebdae.tar.gz
chromium_src-726584d8bde61b540cc8db7d4bb680d5fe9ebdae.tar.bz2
[libphonenumber] Uprev libphonenumber, change directory structure
Now tracking the whole libphonenumber repo in third_party/libphonenumber/dist BUG=585286 TEST=builds TBR=tedchoc Review URL: https://codereview.chromium.org/1694593003 Cr-Commit-Position: refs/heads/master@{#378432}
-rw-r--r--.gitignore4
-rw-r--r--DEPS9
-rw-r--r--content/renderer/android/phone_number_detector.cc6
-rw-r--r--third_party/libphonenumber/BUILD.gn62
-rw-r--r--third_party/libphonenumber/README.chromium12
-rw-r--r--third_party/libphonenumber/libphonenumber.gyp66
-rw-r--r--third_party/libphonenumber/phonenumber_api.h8
7 files changed, 80 insertions, 87 deletions
diff --git a/.gitignore b/.gitignore
index b7d582e..39f0863 100644
--- a/.gitignore
+++ b/.gitignore
@@ -354,9 +354,7 @@ vs-chromium-project.txt
/third_party/libjingle/source
/third_party/libjpeg_turbo
/third_party/liblouis/src
-/third_party/libphonenumber/libphonenumber.xml
-/third_party/libphonenumber/libphonenumber_without_metadata.xml
-/third_party/libphonenumber/src
+/third_party/libphonenumber/dist
/third_party/libsrtp
/third_party/libupnp
/third_party/libvpx_new/source/libvpx
diff --git a/DEPS b/DEPS
index 5e50ff6..2eae5f3 100644
--- a/DEPS
+++ b/DEPS
@@ -232,13 +232,8 @@ deps = {
'src/third_party/libaddressinput/src':
Var('chromium_git') + '/external/libaddressinput.git' + '@' + '5eeeb797e79fa01503fcdcbebdc50036fac023ef',
- # These are all at libphonenumber r728.
- 'src/third_party/libphonenumber/src/phonenumbers':
- Var('chromium_git') + '/external/libphonenumber/cpp/src/phonenumbers.git' + '@' + '0d6e3e50e17c94262ad1ca3b7d52b11223084bca',
- 'src/third_party/libphonenumber/src/test':
- Var('chromium_git') + '/external/libphonenumber/cpp/test.git' + '@' + 'f351a7e007f9c9995494499120bbc361ca808a16',
- 'src/third_party/libphonenumber/src/resources':
- Var('chromium_git') + '/external/libphonenumber/resources.git' + '@' + 'b6dfdc7952571ff7ee72643cd88c988cbe966396',
+ 'src/third_party/libphonenumber/dist':
+ Var('chromium_git') + '/external/libphonenumber.git' + '@' + 'a9bd368debe74355364965c24bcc5a6bfb1dc546',
'src/third_party/webpagereplay':
Var('chromium_git') + '/external/github.com/chromium/web-page-replay.git' + '@' + '7564939bdf6482d57b9bd5e9c931679f96d8cf75',
diff --git a/content/renderer/android/phone_number_detector.cc b/content/renderer/android/phone_number_detector.cc
index 7b4b08e..871ee85 100644
--- a/content/renderer/android/phone_number_detector.cc
+++ b/content/renderer/android/phone_number_detector.cc
@@ -10,10 +10,10 @@
#include "base/strings/utf_string_conversions.h"
#include "content/public/renderer/android_content_detection_prefixes.h"
#include "net/base/escape.h"
+#include "third_party/libphonenumber/dist/cpp/src/phonenumbers/phonenumbermatch.h"
+#include "third_party/libphonenumber/dist/cpp/src/phonenumbers/phonenumbermatcher.h"
+#include "third_party/libphonenumber/dist/cpp/src/phonenumbers/region_code.h"
#include "third_party/libphonenumber/phonenumber_api.h"
-#include "third_party/libphonenumber/src/phonenumbers/phonenumbermatch.h"
-#include "third_party/libphonenumber/src/phonenumbers/phonenumbermatcher.h"
-#include "third_party/libphonenumber/src/phonenumbers/region_code.h"
using i18n::phonenumbers::PhoneNumberMatch;
using i18n::phonenumbers::PhoneNumberMatcher;
diff --git a/third_party/libphonenumber/BUILD.gn b/third_party/libphonenumber/BUILD.gn
index b72c2ad..0e979c0 100644
--- a/third_party/libphonenumber/BUILD.gn
+++ b/third_party/libphonenumber/BUILD.gn
@@ -7,15 +7,15 @@ import("//third_party/protobuf/proto_library.gni")
proto_library("proto") {
sources = [
- "src/resources/phonemetadata.proto",
- "src/resources/phonenumber.proto",
+ "dist/resources/phonemetadata.proto",
+ "dist/resources/phonenumber.proto",
]
proto_out_dir = "third_party/libphonenumber/phonenumbers"
}
config("libphonenumber_config") {
include_dirs = [
- "src",
+ "dist/cpp/src",
"$root_gen_dir/third_party/libphonenumber",
]
defines = [ "I18N_PHONENUMBERS_USE_ICU_REGEXP=1" ]
@@ -36,22 +36,22 @@ config("libphonenumber_config_internal") {
# GYP version: third_party/libphonenumber/libphonenumber.gyp:libphonenumber_without_metadata
static_library("libphonenumber_without_metadata") {
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",
- "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/string_byte_sink.cc",
- "src/phonenumbers/stringutil.cc",
- "src/phonenumbers/unicodestring.cc",
- "src/phonenumbers/utf/rune.c",
- "src/phonenumbers/utf/unicodetext.cc",
- "src/phonenumbers/utf/unilib.cc",
+ "dist/cpp/src/phonenumbers/asyoutypeformatter.cc",
+ "dist/cpp/src/phonenumbers/base/strings/string_piece.cc",
+ "dist/cpp/src/phonenumbers/default_logger.cc",
+ "dist/cpp/src/phonenumbers/logger.cc",
+ "dist/cpp/src/phonenumbers/phonenumber.cc",
+ "dist/cpp/src/phonenumbers/phonenumbermatch.cc",
+ "dist/cpp/src/phonenumbers/phonenumbermatcher.cc",
+ "dist/cpp/src/phonenumbers/phonenumberutil.cc",
+ "dist/cpp/src/phonenumbers/regexp_adapter_icu.cc",
+ "dist/cpp/src/phonenumbers/regexp_cache.cc",
+ "dist/cpp/src/phonenumbers/string_byte_sink.cc",
+ "dist/cpp/src/phonenumbers/stringutil.cc",
+ "dist/cpp/src/phonenumbers/unicodestring.cc",
+ "dist/cpp/src/phonenumbers/utf/rune.c",
+ "dist/cpp/src/phonenumbers/utf/unicodetext.cc",
+ "dist/cpp/src/phonenumbers/utf/unilib.cc",
]
# libphonenumber's base/logging.h is a minimal implementation where DCHECKs
@@ -81,8 +81,8 @@ static_library("libphonenumber") {
sources = [
# Comment next line and uncomment the line after, if complete metadata
# (with examples) is needed.
- "src/phonenumbers/lite_metadata.cc",
- #"src/phonenumbers/metadata.cc",
+ "dist/cpp/src/phonenumbers/lite_metadata.cc",
+ #"dist/cpp/src/phonenumbers/metadata.cc",
]
public_deps = [
@@ -93,20 +93,20 @@ static_library("libphonenumber") {
# GYP version: third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests
test("libphonenumber_unittests") {
sources = [
- "src/phonenumbers/test_metadata.cc",
- "src/test/phonenumbers/asyoutypeformatter_test.cc",
- "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",
+ "dist/cpp/src/phonenumbers/test_metadata.cc",
+ "dist/cpp/test/phonenumbers/asyoutypeformatter_test.cc",
+ "dist/cpp/test/phonenumbers/phonenumbermatch_test.cc",
+ "dist/cpp/test/phonenumbers/phonenumbermatcher_test.cc",
+ "dist/cpp/test/phonenumbers/phonenumberutil_test.cc",
+ "dist/cpp/test/phonenumbers/regexp_adapter_test.cc",
+ "dist/cpp/test/phonenumbers/stringutil_test.cc",
+ "dist/cpp/test/phonenumbers/test_util.cc",
+ "dist/cpp/test/phonenumbers/unicodestring_test.cc",
]
configs += [ ":libphonenumber_config_internal" ]
- include_dirs = [ "src/test" ]
+ include_dirs = [ "dist/cpp/test" ]
deps = [
":libphonenumber_without_metadata",
diff --git a/third_party/libphonenumber/README.chromium b/third_party/libphonenumber/README.chromium
index b4fc37f..6e6cda5 100644
--- a/third_party/libphonenumber/README.chromium
+++ b/third_party/libphonenumber/README.chromium
@@ -1,8 +1,8 @@
Name: International Phone Number Library
Short Name: libphonenumber
-URL: http://libphonenumber.googlecode.com/svn/trunk/
+URL: https://github.com/googlei18n/libphonenumber/
Version: unknown
-Revision: 584
+Revision: a9bd368debe74355364965c24bcc5a6bfb1dc546
License: Apache 2.0
License File: LICENSE
Security Critical: yes
@@ -21,12 +21,12 @@ Additional files, not in the original library:
LICENSE # Taken from https://github.com/googlei18n/libphonenumber/
phonenumber_api.h
-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
+The library is mapped through the DEPS file into dist/ folder. To update:
+1. Get the latest commit hash from
+ https://github.com/googlei18n/libphonenumber/
2. Locally update this file and DEPS.
3. run 'gclient sync'
-4. Adjust libphonenumber.gyp if necessary.
+4. Adjust libphonenumber.gyp/BUILD.gn 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
diff --git a/third_party/libphonenumber/libphonenumber.gyp b/third_party/libphonenumber/libphonenumber.gyp
index 363451b..936c291 100644
--- a/third_party/libphonenumber/libphonenumber.gyp
+++ b/third_party/libphonenumber/libphonenumber.gyp
@@ -5,8 +5,8 @@
{
'target_defaults': {
'include_dirs': [
- 'src',
- 'src/test',
+ 'dist/cpp/src',
+ 'dist/cpp/test',
# The libphonenumber source (and test code) expects the
# generated protocol headers to be available with "phonenumbers" include
# path, e.g. #include "phonenumbers/foo.pb.h".
@@ -44,27 +44,27 @@
'../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',
- '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/string_byte_sink.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',
+ 'dist/cpp/src/phonenumbers/asyoutypeformatter.cc',
+ 'dist/cpp/src/phonenumbers/base/strings/string_piece.cc',
+ 'dist/cpp/src/phonenumbers/default_logger.cc',
+ 'dist/cpp/src/phonenumbers/logger.cc',
+ 'dist/cpp/src/phonenumbers/phonenumber.cc',
+ 'dist/cpp/src/phonenumbers/phonenumbermatch.cc',
+ 'dist/cpp/src/phonenumbers/phonenumbermatcher.cc',
+ 'dist/cpp/src/phonenumbers/phonenumberutil.cc',
+ 'dist/cpp/src/phonenumbers/regexp_adapter_icu.cc',
+ 'dist/cpp/src/phonenumbers/regexp_cache.cc',
+ 'dist/cpp/src/phonenumbers/string_byte_sink.cc',
+ 'dist/cpp/src/phonenumbers/stringutil.cc',
+ 'dist/cpp/src/phonenumbers/unicodestring.cc',
+ 'dist/cpp/src/phonenumbers/utf/rune.c',
+ 'dist/cpp/src/phonenumbers/utf/unicodetext.cc',
+ 'dist/cpp/src/phonenumbers/utf/unilib.cc',
+ 'dist/resources/phonemetadata.proto',
+ 'dist/resources/phonenumber.proto',
],
'variables': {
- 'proto_in_dir': 'src/resources',
+ 'proto_in_dir': 'dist/resources',
'proto_out_dir': 'third_party/libphonenumber/phonenumbers',
'clang_warning_flags': [
# https://github.com/googlei18n/libphonenumber/pull/741
@@ -75,7 +75,7 @@
'direct_dependent_settings': {
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber',
- 'src',
+ 'dist/cpp/src',
],
'defines': [
'I18N_PHONENUMBERS_USE_ICU_REGEXP=1',
@@ -110,8 +110,8 @@
'sources': [
# Comment next line and uncomment the line after, if complete metadata
# (with examples) is needed.
- 'src/phonenumbers/lite_metadata.cc',
- #'src/phonenumbers/metadata.cc',
+ 'dist/cpp/src/phonenumbers/lite_metadata.cc',
+ #'dist/cpp/src/phonenumbers/metadata.cc',
],
},
{
@@ -119,15 +119,15 @@
'target_name': 'libphonenumber_unittests',
'type': 'executable',
'sources': [
- 'src/phonenumbers/test_metadata.cc',
- 'src/test/phonenumbers/asyoutypeformatter_test.cc',
- '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',
+ 'dist/cpp/src/phonenumbers/test_metadata.cc',
+ 'dist/cpp/test/phonenumbers/asyoutypeformatter_test.cc',
+ 'dist/cpp/test/phonenumbers/phonenumbermatch_test.cc',
+ 'dist/cpp/test/phonenumbers/phonenumbermatcher_test.cc',
+ 'dist/cpp/test/phonenumbers/phonenumberutil_test.cc',
+ 'dist/cpp/test/phonenumbers/regexp_adapter_test.cc',
+ 'dist/cpp/test/phonenumbers/stringutil_test.cc',
+ 'dist/cpp/test/phonenumbers/test_util.cc',
+ 'dist/cpp/test/phonenumbers/unicodestring_test.cc',
],
'dependencies': [
'../icu/icu.gyp:icui18n',
diff --git a/third_party/libphonenumber/phonenumber_api.h b/third_party/libphonenumber/phonenumber_api.h
index 4a7fcd1..e838016 100644
--- a/third_party/libphonenumber/phonenumber_api.h
+++ b/third_party/libphonenumber/phonenumber_api.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef THIRD_PARTY_LIBPHONENUMBER_SRC_PHONENUMBER_API_H_
-#define THIRD_PARTY_LIBPHONENUMBER_SRC_PHONENUMBER_API_H_
+#ifndef THIRD_PARTY_LIBPHONENUMBER_PHONENUMBER_API_H_
+#define THIRD_PARTY_LIBPHONENUMBER_PHONENUMBER_API_H_
#pragma once
#define USE_GOOGLE_BASE
-#include "third_party/libphonenumber/src/phonenumbers/phonenumberutil.h"
+#include "third_party/libphonenumber/dist/cpp/src/phonenumbers/phonenumberutil.h"
#undef USE_GOOGLE_BASE
-#endif // THIRD_PARTY_LIBPHONENUMBER_SRC_PHONENUMBER_API_H_
+#endif // THIRD_PARTY_LIBPHONENUMBER_PHONENUMBER_API_H_