ExtensionInstallDialogView: fix scrolling behavior on Views (Win,Linux)
[chromium-blink-merge.git] / url / BUILD.gn
blobdb5a6ad5ce762deda65bffda28474b94e7bd6e4a
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//testing/test.gni")
6 import("//url/config.gni")
8 # Sets the USE_ICU_ALTERNATIVES_ON_ANDROID define based on the build flag.
9 config("url_icu_config") {
10   if (use_icu_alternatives_on_android) {
11     defines = [ "USE_ICU_ALTERNATIVES_ON_ANDROID=1" ]
12   }
15 component("url") {
16   if (is_win) {
17     # Don't conflict with Windows' "url.dll".
18     output_name = "url_lib"
19   }
20   sources = [
21     "android/url_jni_registrar.cc",
22     "android/url_jni_registrar.h",
23     "deprecated_serialized_origin.cc",
24     "deprecated_serialized_origin.h",
25     "gurl.cc",
26     "gurl.h",
27     "scheme_host_port.cc",
28     "scheme_host_port.h",
29     "third_party/mozilla/url_parse.cc",
30     "third_party/mozilla/url_parse.h",
31     "url_canon.h",
32     "url_canon_etc.cc",
33     "url_canon_filesystemurl.cc",
34     "url_canon_fileurl.cc",
35     "url_canon_host.cc",
36     "url_canon_icu.cc",
37     "url_canon_icu.h",
38     "url_canon_internal.cc",
39     "url_canon_internal.h",
40     "url_canon_internal_file.h",
41     "url_canon_ip.cc",
42     "url_canon_ip.h",
43     "url_canon_mailtourl.cc",
44     "url_canon_path.cc",
45     "url_canon_pathurl.cc",
46     "url_canon_query.cc",
47     "url_canon_relative.cc",
48     "url_canon_stdstring.cc",
49     "url_canon_stdstring.h",
50     "url_canon_stdurl.cc",
51     "url_constants.cc",
52     "url_constants.h",
53     "url_export.h",
54     "url_file.h",
55     "url_parse_file.cc",
56     "url_parse_internal.h",
57     "url_util.cc",
58     "url_util.h",
59   ]
61   defines = [ "URL_IMPLEMENTATION" ]
63   configs += [
64     ":url_icu_config",
66     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
67     "//build/config/compiler:no_size_t_to_int_warning",
68   ]
70   deps = [
71     "//base",
72     "//base/third_party/dynamic_annotations",
73     "//third_party/icu:icudata",
74     "//third_party/icu",
75   ]
77   if (use_icu_alternatives_on_android) {
78     sources -= [
79       "url_canon_icu.cc",
80       "url_canon_icu.h",
81     ]
82     deps -= [
83       "//third_party/icu:icudata",
84       "//third_party/icu",
85     ]
87     sources += [
88       "url_canon_icu_alternatives_android.cc",
89       "url_canon_icu_alternatives_android.h",
90     ]
91   }
94 # TODO(dpranke): crbug.com/360936. Get this to build and run on Android.
95 if (!is_android) {
96   test("url_unittests") {
97     sources = [
98       "deprecated_serialized_origin_unittest.cc",
99       "gurl_unittest.cc",
100       "scheme_host_port_unittest.cc",
101       "url_canon_icu_unittest.cc",
102       "url_canon_unittest.cc",
103       "url_parse_unittest.cc",
104       "url_test_utils.h",
105       "url_util_unittest.cc",
106     ]
108     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
109     configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
111     #if (is_posix && !is_mac && !is_ios) {
112     #  if (use_allocator!="none") {
113     #    deps += "//base/allocator"
114     #  }
115     #}
117     deps = [
118       ":url",
119       "//base",
120       "//base/test:run_all_unittests",
121       "//testing/gtest",
122       "//third_party/icu:icuuc",
123     ]
125     if (use_icu_alternatives_on_android) {
126       sources -= [ "url_canon_icu_unittest.cc" ]
127       deps -= [ "//third_party/icu:icuuc" ]
128     }
129   }