| Index: chrome/utility/chrome_content_utility_client.cc
|
| diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc
|
| index a9c67a133c7e1a4f4dec099deca72bc820651e0b..8740530b13beab6c9e2d7b0a6c115be656c44259 100644
|
| --- a/chrome/utility/chrome_content_utility_client.cc
|
| +++ b/chrome/utility/chrome_content_utility_client.cc
|
| @@ -6,13 +6,13 @@
|
|
|
| #include "base/command_line.h"
|
| #include "base/files/file_path.h"
|
| -#include "base/json/json_reader.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/time/time.h"
|
| #include "chrome/common/chrome_utility_messages.h"
|
| #include "chrome/common/safe_browsing/zip_analyzer.h"
|
| #include "chrome/common/safe_browsing/zip_analyzer_results.h"
|
| #include "chrome/utility/chrome_content_utility_ipc_whitelist.h"
|
| +#include "chrome/utility/safe_json_parser_handler.h"
|
| #include "chrome/utility/utility_message_handler.h"
|
| #include "content/public/child/image_decoder_utils.h"
|
| #include "content/public/common/content_switches.h"
|
| @@ -123,6 +123,8 @@ ChromeContentUtilityClient::ChromeContentUtilityClient()
|
| handlers_.push_back(new ShellHandler());
|
| handlers_.push_back(new FontCacheHandler());
|
| #endif
|
| +
|
| + handlers_.push_back(new SafeJsonParserHandler());
|
| }
|
|
|
| ChromeContentUtilityClient::~ChromeContentUtilityClient() {
|
| @@ -155,7 +157,6 @@ bool ChromeContentUtilityClient::OnMessageReceived(
|
| IPC_MESSAGE_HANDLER(ChromeUtilityMsg_RobustJPEGDecodeImage,
|
| OnRobustJPEGDecodeImage)
|
| #endif // defined(OS_CHROMEOS)
|
| - IPC_MESSAGE_HANDLER(ChromeUtilityMsg_ParseJSON, OnParseJSON)
|
| IPC_MESSAGE_HANDLER(ChromeUtilityMsg_PatchFileBsdiff,
|
| OnPatchFileBsdiff)
|
| IPC_MESSAGE_HANDLER(ChromeUtilityMsg_PatchFileCourgette,
|
| @@ -336,21 +337,6 @@ void ChromeContentUtilityClient::OnRobustJPEGDecodeImage(
|
| }
|
| #endif // defined(OS_CHROMEOS)
|
|
|
| -void ChromeContentUtilityClient::OnParseJSON(const std::string& json) {
|
| - int error_code;
|
| - std::string error;
|
| - base::Value* value = base::JSONReader::ReadAndReturnError(
|
| - json, base::JSON_PARSE_RFC, &error_code, &error);
|
| - if (value) {
|
| - base::ListValue wrapper;
|
| - wrapper.Append(value);
|
| - Send(new ChromeUtilityHostMsg_ParseJSON_Succeeded(wrapper));
|
| - } else {
|
| - Send(new ChromeUtilityHostMsg_ParseJSON_Failed(error));
|
| - }
|
| - ReleaseProcessIfNeeded();
|
| -}
|
| -
|
| void ChromeContentUtilityClient::OnPatchFileBsdiff(
|
| const base::FilePath& input_file,
|
| const base::FilePath& patch_file,
|
|
|