Once SafeJsonParser::Parse uses OnceCallback, ReportingDelegate::SafelyParseJson should too.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c8f4b6863de9997033e4ba61266a97e83d6e2f25 commit c8f4b6863de9997033e4ba61266a97e83d6e2f25 Author: Douglas Creager <dcreager@chromium.org> Date: Mon Oct 08 12:46:19 2018 Reporting: Add delegate for parsing JSON This will allow us to add a new implementation that uses data_decoder to safely parse the untrusted JSON headers in a utility process. This patch just adds the new delegate interface and a default implementation that provides the existing behavior of parsing in-process. Bug: 892148 , 811485 Change-Id: Ida8027ce44163c7f35535a3327343b7bf94ea854 Reviewed-on: https://chromium-review.googlesource.com/c/1262595 Commit-Queue: Douglas Creager <dcreager@chromium.org> Reviewed-by: Misha Efimov <mef@chromium.org> Cr-Commit-Position: refs/heads/master@{#597540} [modify] https://crrev.com/c8f4b6863de9997033e4ba61266a97e83d6e2f25/net/BUILD.gn [modify] https://crrev.com/c8f4b6863de9997033e4ba61266a97e83d6e2f25/net/network_error_logging/network_error_logging_end_to_end_test.cc [add] https://crrev.com/c8f4b6863de9997033e4ba61266a97e83d6e2f25/net/reporting/json_parser_delegate.cc [add] https://crrev.com/c8f4b6863de9997033e4ba61266a97e83d6e2f25/net/reporting/json_parser_delegate.h [modify] https://crrev.com/c8f4b6863de9997033e4ba61266a97e83d6e2f25/net/reporting/reporting_context.cc [modify] https://crrev.com/c8f4b6863de9997033e4ba61266a97e83d6e2f25/net/reporting/reporting_context.h [modify] https://crrev.com/c8f4b6863de9997033e4ba61266a97e83d6e2f25/net/reporting/reporting_delegate.cc [modify] https://crrev.com/c8f4b6863de9997033e4ba61266a97e83d6e2f25/net/reporting/reporting_delegate.h [modify] https://crrev.com/c8f4b6863de9997033e4ba61266a97e83d6e2f25/net/reporting/reporting_service.cc [modify] https://crrev.com/c8f4b6863de9997033e4ba61266a97e83d6e2f25/net/reporting/reporting_service.h [modify] https://crrev.com/c8f4b6863de9997033e4ba61266a97e83d6e2f25/net/reporting/reporting_test_util.cc [modify] https://crrev.com/c8f4b6863de9997033e4ba61266a97e83d6e2f25/net/reporting/reporting_test_util.h [modify] https://crrev.com/c8f4b6863de9997033e4ba61266a97e83d6e2f25/net/url_request/url_request_context_builder.cc [modify] https://crrev.com/c8f4b6863de9997033e4ba61266a97e83d6e2f25/net/url_request/url_request_context_builder.h
Comment 1 by juliatut...@chromium.org
, Feb 25 2018