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

Unified 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: build files 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/safe_json.gypi ('k') | components/safe_json/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_json/BUILD.gn
diff --git a/components/safe_json/BUILD.gn b/components/safe_json/BUILD.gn
index a57efcc6fdb8fa5be1597103c69d87bddfb0889c..2748f60c43d89eb1ad06e0e651028eafd37f0281 100644
--- a/components/safe_json/BUILD.gn
+++ b/components/safe_json/BUILD.gn
@@ -2,11 +2,22 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+if (is_android) {
+ import("//build/config/android/rules.gni")
+}
+
# GYP version: components/safe_json.gypi:safe_json
source_set("safe_json") {
sources = [
+ "android/component_jni_registrar.cc",
+ "android/component_jni_registrar.h",
+ "json_sanitizer.cc",
+ "json_sanitizer.h",
+ "json_sanitizer_android.cc",
"safe_json_parser.cc",
"safe_json_parser.h",
+ "safe_json_parser_android.cc",
+ "safe_json_parser_android.h",
"safe_json_parser_impl.cc",
"safe_json_parser_impl.h",
]
@@ -18,6 +29,30 @@ source_set("safe_json") {
"//content/public/browser",
"//ui/base",
]
+
+ if (is_android) {
+ sources -= [
+ "json_sanitizer.cc",
+ "safe_json_parser_impl.cc",
+ "safe_json_parser_impl.h",
+ ]
+ deps += [ "android:safe_json_jni_headers" ]
+ }
+}
+
+# GYP version: components/safe_json.gypi:safe_json_unittest_sources
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "json_sanitizer_unittest.cc",
+ ]
+
+ deps = [
+ ":safe_json",
+ ":test_support",
+ "//base",
+ "//testing/gtest",
+ ]
}
# GYP version: components/safe_json.gypi:safe_json_test_support
@@ -45,7 +80,8 @@ source_set("safe_json_parser_message_filter") {
deps = [
"//base",
- "//content/public/browser",
+ "//content/public/common",
+ "//content/public/utility",
"//ipc",
]
}
« no previous file with comments | « components/safe_json.gypi ('k') | components/safe_json/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698