Add 'did_proceed' and 'repeat_visit' to ClientMalwareReportRequest to track CTR.
[chromium-blink-merge.git] / components / resource_provider / BUILD.gn
blobaae1a75f9e223578806e262aa5ba1e1082ccf9e9
1 # Copyright 2015 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("//mojo/public/mojo_application.gni")
6 import("//testing/test.gni")
8 if (is_android) {
9   import("//build/config/android/rules.gni")
11   java_library_path = "$target_out_dir/java_library.dex.jar"
13   mojo_android_application("resource_provider") {
14     input_so =
15         "$root_shlib_dir/${shlib_prefix}resource_provider_lib$shlib_extension"
16     input_dex_jar = java_library_path
17     deps = [
18       ":java_library",
19       ":resource_provider_lib",
20       "//third_party/icu:icudata",
21     ]
23     resources = [ "$root_out_dir/icudtl.dat" ]
24   }
26   shared_library("resource_provider_lib") {
27     sources = [
28       "android/android_hooks.cc",
29       "main.cc",
30     ]
32     deps = [
33       ":jni_headers",
34       ":lib",
35       "//base",
36       "//build/config/sanitizers:deps",
37       "//components/resource_provider/public/interfaces",
38       "//mojo/environment:chromium",
39       "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
40       "//url",
41     ]
42   }
44   generate_jni("jni_headers") {
45     sources = [
46       "android/java/org/chromium/resource_provider/Main.java",
47     ]
48     jni_package = "components/resource_provider"
49   }
51   android_library("java_classes") {
52     java_files = [ "android/java/org/chromium/resource_provider/Main.java" ]
54     deps = [
55       "//base:base_java",
56     ]
57   }
59   android_standalone_library("java_library") {
60     dex_path = java_library_path
62     deps = [
63       ":java_classes",
64     ]
65   }
66 } else {
67   mojo_native_application("resource_provider") {
68     sources = [
69       "main.cc",
70     ]
72     deps = [
73       ":lib",
74       "//base",
75       "//components/resource_provider/public/interfaces",
76       "//mojo/environment:chromium",
77       "//third_party/icu:icudata",
78       "//url",
79     ]
81     resources = [ "$root_out_dir/icudtl.dat" ]
82   }
85 source_set("lib") {
86   sources = [
87     "file_utils.cc",
88     "file_utils.h",
89     "resource_provider_app.cc",
90     "resource_provider_app.h",
91     "resource_provider_impl.cc",
92     "resource_provider_impl.h",
93   ]
95   deps = [
96     "//base",
97     "//components/resource_provider/public/interfaces",
98     "//mojo/application/public/cpp",
99     "//mojo/common:common_base",
100     "//mojo/platform_handle",
101     "//url",
102   ]
105 test("resource_provider_unittests") {
106   sources = [
107     "file_utils_unittest.cc",
108   ]
110   deps = [
111     ":lib",
112     "//base",
113     "//base/test:test_config",
114     "//components/resource_provider/public/interfaces",
115     "//mojo/environment:chromium",
116     "//testing/gtest",
117     "//third_party/mojo/src/mojo/edk/test:run_all_unittests",
118     "//url",
119   ]
122 mojo_native_application("apptests") {
123   output_name = "resource_provider_apptests"
124   testonly = true
126   sources = [
127     "resource_provider_apptest.cc",
128   ]
130   resources = [
131     "//components/test/data/resource_provider/sample",
132     "//components/test/data/resource_provider/dir",
133   ]
135   deps = [
136     "//base",
137     "//base/test:test_config",
138     "//components/resource_provider/public/cpp",
139     "//components/resource_provider/public/interfaces",
140     "//mojo/application/public/cpp:test_support",
141     "//mojo/platform_handle",
142   ]
144   data_deps = [ ":resource_provider" ]