Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Unified Diff: trunk/src/third_party/libaddressinput/BUILD.gn

Issue 388613002: Revert 282408 "Use upstream libaddressinput in Chrome." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: trunk/src/third_party/libaddressinput/BUILD.gn
===================================================================
--- trunk/src/third_party/libaddressinput/BUILD.gn (revision 282425)
+++ trunk/src/third_party/libaddressinput/BUILD.gn (working copy)
@@ -4,69 +4,70 @@
import("//tools/grit/grit_rule.gni")
-# The list of files in libaddressinput.gypi.
-gypi_values = exec_script(
- "//build/gypi_to_gn.py",
- [ rebase_path("src/cpp/libaddressinput.gypi") ],
- "scope",
- [ "src/cpp/libaddressinput.gypi" ])
+# TODO(rouslan): Use the src/ directory. http://crbug.com/327046
+libaddressinput_dir = "chromium"
-libaddressinput_util_files = [
- "src/cpp/src/address_data.cc",
- "src/cpp/src/address_field.cc",
- "src/cpp/src/address_field_util.cc",
- "src/cpp/src/address_formatter.cc",
- "src/cpp/src/address_metadata.cc",
- "src/cpp/src/address_ui.cc",
- "src/cpp/src/format_element.cc",
- "src/cpp/src/language.cc",
- "src/cpp/src/localization.cc",
- "src/cpp/src/lookup_key.cc",
- "src/cpp/src/region_data_constants.cc",
- "src/cpp/src/rule.cc",
- "src/cpp/src/util/cctype_tolower_equal.cc",
- "src/cpp/src/util/json.cc",
- "src/cpp/src/util/string_split.cc",
- "src/cpp/src/util/string_util.cc",
-]
-
# GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput_strings
grit("strings") {
+ source = "$libaddressinput_dir/cpp/res/libaddressinput_strings.grd"
+}
+
+# GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput_updated_strings
+grit("updated_strings") {
source = "//chrome/app/address_input_strings.grd"
}
config("libaddressinput_config") {
defines = [
- "I18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1",
- "VALIDATION_DATA_URL=\"https://i18napis.appspot.com/ssl-aggregate-address/\"",
+ "CUSTOM_BASICTYPES=\"base/basictypes.h\"",
+ "CUSTOM_SCOPED_PTR=\"base/memory/scoped_ptr.h\"",
]
- include_dirs = [
- "src/cpp/include",
- "chromium/override",
- ]
+ include_dirs = [ "$libaddressinput_dir/cpp/include" ]
}
# This target provides basic functionality which is cooked into the build.
# GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput_util
static_library("util") {
- sources = libaddressinput_util_files
- sources += [
+ sources = [
"chromium/addressinput_util.cc",
+ "chromium/addressinput_util.h",
+ "chromium/canonicalize_string.cc",
"chromium/json.cc",
+ "$libaddressinput_dir/cpp/include/libaddressinput/address_data.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/address_field.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/address_formatter.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/address_metadata.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/address_problem.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/util/basictypes.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/util/internal/basictypes.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/util/internal/move.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/util/internal/scoped_ptr.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/util/internal/template_util.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/util/scoped_ptr.h",
+ "$libaddressinput_dir/cpp/src/address_data.cc",
+ "$libaddressinput_dir/cpp/src/address_field.cc",
+ "$libaddressinput_dir/cpp/src/address_formatter.cc",
+ "$libaddressinput_dir/cpp/src/address_metadata.cc",
+ "$libaddressinput_dir/cpp/src/address_problem.cc",
+ "$libaddressinput_dir/cpp/src/language.cc",
+ "$libaddressinput_dir/cpp/src/language.h",
+ "$libaddressinput_dir/cpp/src/region_data_constants.cc",
+ "$libaddressinput_dir/cpp/src/region_data_constants.h",
+ "$libaddressinput_dir/cpp/src/rule.cc",
+ "$libaddressinput_dir/cpp/src/rule.h",
+ "$libaddressinput_dir/cpp/src/util/canonicalize_string.h",
+ "$libaddressinput_dir/cpp/src/util/cctype_tolower_equal.cc",
+ "$libaddressinput_dir/cpp/src/util/cctype_tolower_equal.h",
+ "$libaddressinput_dir/cpp/src/util/json.h",
+ "$libaddressinput_dir/cpp/src/util/stl_util.h",
+ "$libaddressinput_dir/cpp/src/util/string_util.cc",
+ "$libaddressinput_dir/cpp/src/util/string_util.h",
]
- sources -= [
- "src/cpp/src/util/json.cc",
- ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
-
direct_dependent_configs = [ ":libaddressinput_config" ]
+ include_dirs = [ "$root_gen_dir/libaddressinput" ]
- include_dirs = [ "$root_gen_dir/third_party/libaddressinput" ]
-
deps = [
- ":strings",
"//base",
"//base:i18n",
"//third_party/icu",
@@ -78,28 +79,41 @@
# for validation rules.
# GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput
static_library("libaddressinput") {
- sources = rebase_path(gypi_values.libaddressinput_files, ".", "src/cpp")
- sources += [
- "chromium/chrome_address_validator.cc",
+ sources = [
"chromium/chrome_downloader_impl.cc",
+ "chromium/chrome_downloader_impl.h",
"chromium/chrome_storage_impl.cc",
- "chromium/fallback_data_store.cc",
- "chromium/input_suggester.cc",
- "chromium/string_compare.cc",
- "chromium/trie.cc",
+ "chromium/chrome_storage_impl.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/address_ui_component.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/address_ui.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/address_validator.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/load_rules_delegate.h",
+ "$libaddressinput_dir/cpp/src/address_ui.cc",
+ "$libaddressinput_dir/cpp/src/address_validator.cc",
+ "$libaddressinput_dir/cpp/src/country_rules_aggregator.cc",
+ "$libaddressinput_dir/cpp/src/country_rules_aggregator.h",
+ "$libaddressinput_dir/cpp/src/fallback_data_store.cc",
+ "$libaddressinput_dir/cpp/src/fallback_data_store.h",
+ "$libaddressinput_dir/cpp/src/grit.h",
+ "$libaddressinput_dir/cpp/src/retriever.cc",
+ "$libaddressinput_dir/cpp/src/retriever.h",
+ "$libaddressinput_dir/cpp/src/ruleset.cc",
+ "$libaddressinput_dir/cpp/src/ruleset.h",
+ "$libaddressinput_dir/cpp/src/util/md5.cc",
+ "$libaddressinput_dir/cpp/src/util/md5.h",
+ "$libaddressinput_dir/cpp/src/util/trie.cc",
+ "$libaddressinput_dir/cpp/src/util/trie.h",
]
- sources -= libaddressinput_util_files
- sources -= [
- "src/cpp/src/util/string_compare.cc",
- ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
-
direct_dependent_configs = [ ":libaddressinput_config" ]
+ defines = [
+ "VALIDATION_DATA_URL=\"https://i18napis.appspot.com/ssl-aggregate-address/\"",
+ ]
+
deps = [
":strings",
+ ":updated_strings",
":util",
"//base",
"//base:i18n",
@@ -109,27 +123,42 @@
}
test("libaddressinput_unittests") {
- sources = rebase_path(gypi_values.libaddressinput_test_files, ".", "src/cpp")
- sources += [
+ sources = [
"chromium/addressinput_util_unittest.cc",
- "chromium/chrome_address_validator_unittest.cc",
"chromium/chrome_downloader_impl_unittest.cc",
+ "chromium/chrome_rule_test.cc",
"chromium/chrome_storage_impl_unittest.cc",
- "chromium/fallback_data_store_unittest.cc",
- "chromium/storage_test_runner.cc",
- "chromium/string_compare_unittest.cc",
- "chromium/trie_unittest.cc",
+ "$libaddressinput_dir/cpp/test/address_data_test.cc",
+ "$libaddressinput_dir/cpp/test/address_ui_test.cc",
+ "$libaddressinput_dir/cpp/test/address_validator_test.cc",
+ "$libaddressinput_dir/cpp/test/country_rules_aggregator_test.cc",
+ "$libaddressinput_dir/cpp/test/countryinfo_example_addresses_test.cc",
+ "$libaddressinput_dir/cpp/test/fake_downloader.cc",
+ "$libaddressinput_dir/cpp/test/fake_downloader.h",
+ "$libaddressinput_dir/cpp/test/fake_downloader_test.cc",
+ "$libaddressinput_dir/cpp/test/fake_storage.cc",
+ "$libaddressinput_dir/cpp/test/fake_storage.h",
+ "$libaddressinput_dir/cpp/test/fake_storage_test.cc",
+ "$libaddressinput_dir/cpp/test/fallback_data_store_test.cc",
+ "$libaddressinput_dir/cpp/test/region_data_constants_test.cc",
+ "$libaddressinput_dir/cpp/test/retriever_test.cc",
+ "$libaddressinput_dir/cpp/test/rule_test.cc",
+ "$libaddressinput_dir/cpp/test/storage_test_runner.cc",
+ "$libaddressinput_dir/cpp/test/storage_test_runner.h",
+ "$libaddressinput_dir/cpp/test/util/json_test.cc",
+ "$libaddressinput_dir/cpp/test/util/md5_unittest.cc",
+ "$libaddressinput_dir/cpp/test/util/scoped_ptr_unittest.cc",
+ "$libaddressinput_dir/cpp/test/util/stl_util_unittest.cc",
+ "$libaddressinput_dir/cpp/test/util/string_util_test.cc",
+ "$libaddressinput_dir/cpp/test/util/trie_test.cc",
]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
-
defines = [
"TEST_DATA_DIR=\"third_party/libaddressinput/src/testdata\"",
]
include_dirs = [
- "src/cpp/src",
+ "$libaddressinput_dir/cpp/src",
]
deps = [
« no previous file with comments | « trunk/src/components/autofill/core/browser/autofill_profile.cc ('k') | trunk/src/third_party/libaddressinput/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698