blob: 3040ba02cbf55c980ff7e667eca28d12be5f4666 [file] [log] [blame]
# Copyright 2015 The Chromium Authors. All rights reserved.
# 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")
}
static_library("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",
]
deps = [
"//base",
"//components/safe_json/public/interfaces",
"//components/strings",
"//content/public/browser",
"//content/public/common",
"//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" ]
deps -= [
"//components/safe_json/public/interfaces",
"//content/public/browser",
]
}
}
source_set("unit_tests") {
testonly = true
sources = [
"json_sanitizer_unittest.cc",
"testing_json_parser_unittest.cc",
]
deps = [
":safe_json",
":test_support",
"//base",
"//testing/gtest",
]
}
static_library("test_support") {
testonly = true
sources = [
"testing_json_parser.cc",
"testing_json_parser.h",
]
deps = [
":safe_json",
"//base",
]
}