diff options
author | bauerb <bauerb@chromium.org> | 2015-07-13 04:05:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-13 11:06:17 +0000 |
commit | b1704d0c90a6eb1e4d5eb1e83976e5964ee378b7 (patch) | |
tree | 3fc9c84049911645710aa2a9bb5f06e38ed84b5d /components/components_tests.gyp | |
parent | f8633deb9da835a863a5f77bdc1c52ee701d8ae2 (diff) | |
download | chromium_src-b1704d0c90a6eb1e4d5eb1e83976e5964ee378b7.zip chromium_src-b1704d0c90a6eb1e4d5eb1e83976e5964ee378b7.tar.gz chromium_src-b1704d0c90a6eb1e4d5eb1e83976e5964ee378b7.tar.bz2 |
Add a JSON sanitizer.
On Android, the JSON sanitizer parses the untrusted JSON in Java and checks it for wellformedness before serializing it again. On desktop platforms it uses SafeJsonParser to parse the JSON out of process, then serializes it again.
Also, on Android (where JsonSanitizer is not implemented in terms of the SafeJsonParser) the SafeJsonParser now uses the JsonSanitizer to sanitize its input before parsing it directly in process, instead of starting a new process, which is very costly on Android.
BUG=501333
Review URL: https://codereview.chromium.org/1203083002
Cr-Commit-Position: refs/heads/master@{#338495}
Diffstat (limited to 'components/components_tests.gyp')
-rw-r--r-- | components/components_tests.gyp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/components_tests.gyp b/components/components_tests.gyp index d06e4ce..dddb001 100644 --- a/components/components_tests.gyp +++ b/components/components_tests.gyp @@ -489,6 +489,9 @@ 'rappor/rappor_utils_unittest.cc', 'rappor/sampler_unittest.cc', ], + 'safe_json_unittest_sources': [ + 'safe_json/json_sanitizer_unittest.cc', + ], 'scheduler_unittest_sources': [ 'scheduler/child/idle_helper_unittest.cc', 'scheduler/child/nestable_task_runner_for_test.cc', @@ -900,6 +903,7 @@ '<@(navigation_interception_unittest_sources)', '<@(network_hints_unittest_sources)', '<@(power_unittest_sources)', + '<@(safe_json_unittest_sources)', '<@(scheduler_unittest_sources)', '<@(storage_monitor_unittest_sources)', '<@(ui_unittest_sources)', @@ -929,6 +933,8 @@ 'components.gyp:password_manager_content_common', 'components.gyp:power', 'components.gyp:precache_content', + 'components.gyp:safe_json', + 'components.gyp:safe_json_test_support', 'components.gyp:sessions_content', 'components.gyp:storage_monitor', 'components.gyp:storage_monitor_test_support', @@ -1061,6 +1067,7 @@ 'dependencies': [ 'components.gyp:cronet_static', 'components.gyp:data_reduction_proxy_content', + 'components.gyp:safe_json_java', '../content/content.gyp:content_java', '../testing/android/native_test.gyp:native_test_native_code', ], |