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

Side by Side Diff: components/safe_json/BUILD.gn

Issue 1203083002: Add a JSON sanitizer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: x Created 5 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 if (is_android) {
6 import("//build/config/android/rules.gni")
7 }
8
5 # GYP version: components/safe_json.gypi:safe_json 9 # GYP version: components/safe_json.gypi:safe_json
6 static_library("safe_json") { 10 static_library("safe_json") {
7 sources = [ 11 sources = [
12 "android/component_jni_registrar.cc",
13 "android/component_jni_registrar.h",
14 "json_sanitizer.cc",
15 "json_sanitizer.h",
16 "json_sanitizer_android.cc",
8 "safe_json_parser.cc", 17 "safe_json_parser.cc",
9 "safe_json_parser.h", 18 "safe_json_parser.h",
19 "safe_json_parser_android.cc",
20 "safe_json_parser_android.h",
10 "safe_json_parser_impl.cc", 21 "safe_json_parser_impl.cc",
11 "safe_json_parser_impl.h", 22 "safe_json_parser_impl.h",
12 ] 23 ]
13 24
14 defines = [ "SAFE_JSON_IMPLEMENTATION" ] 25 defines = [ "SAFE_JSON_IMPLEMENTATION" ]
15 26
16 deps = [ 27 deps = [
17 ":safe_json_parser_message_filter", 28 ":safe_json_parser_message_filter",
18 "//base", 29 "//base",
19 "//components/strings", 30 "//components/strings",
20 "//content/public/browser", 31 "//content/public/browser",
21 "//ui/base", 32 "//ui/base",
22 ] 33 ]
34
35 if (is_android) {
36 sources -= [
37 "json_sanitizer.cc",
38 "safe_json_parser_impl.cc",
39 "safe_json_parser_impl.h",
40 ]
41 deps += [ "android:safe_json_jni_headers" ]
42 }
43 }
44
45 # GYP version: components/safe_json.gypi:safe_json_unittest_sources
46 source_set("unit_tests") {
47 testonly = true
48 sources = [
49 "json_sanitizer_unittest.cc",
50 ]
51
52 deps = [
53 ":safe_json",
54 ":test_support",
55 "//base",
56 "//testing/gtest",
57 ]
23 } 58 }
24 59
25 # GYP version: components/safe_json.gypi:safe_json_test_support 60 # GYP version: components/safe_json.gypi:safe_json_test_support
26 source_set("test_support") { 61 source_set("test_support") {
27 testonly = true 62 testonly = true
28 sources = [ 63 sources = [
29 "testing_json_parser.cc", 64 "testing_json_parser.cc",
30 "testing_json_parser.h", 65 "testing_json_parser.h",
31 ] 66 ]
32 67
(...skipping 11 matching lines...) Expand all
44 "safe_json_parser_messages.cc", 79 "safe_json_parser_messages.cc",
45 "safe_json_parser_messages.h", 80 "safe_json_parser_messages.h",
46 ] 81 ]
47 82
48 deps = [ 83 deps = [
49 "//base", 84 "//base",
50 "//content/public/browser", 85 "//content/public/browser",
51 "//ipc", 86 "//ipc",
52 ] 87 ]
53 } 88 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698