OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/safe_json_parser.h" | 5 #include "chrome/browser/safe_json_parser.h" |
6 | 6 |
7 #include "chrome/common/chrome_utility_messages.h" | 7 #include "chrome/common/extensions/chrome_utility_extensions_messages.h" |
8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
9 #include "content/public/browser/utility_process_host.h" | 9 #include "content/public/browser/utility_process_host.h" |
10 | 10 |
11 using content::BrowserThread; | 11 using content::BrowserThread; |
12 using content::UtilityProcessHost; | 12 using content::UtilityProcessHost; |
13 | 13 |
14 SafeJsonParser::SafeJsonParser(const std::string& unsafe_json, | 14 SafeJsonParser::SafeJsonParser(const std::string& unsafe_json, |
15 const SuccessCallback& success_callback, | 15 const SuccessCallback& success_callback, |
16 const ErrorCallback& error_callback) | 16 const ErrorCallback& error_callback) |
17 : unsafe_json_(unsafe_json), | 17 : unsafe_json_(unsafe_json), |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 bool handled = true; | 74 bool handled = true; |
75 IPC_BEGIN_MESSAGE_MAP(SafeJsonParser, message) | 75 IPC_BEGIN_MESSAGE_MAP(SafeJsonParser, message) |
76 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ParseJSON_Succeeded, | 76 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ParseJSON_Succeeded, |
77 OnJSONParseSucceeded) | 77 OnJSONParseSucceeded) |
78 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ParseJSON_Failed, | 78 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ParseJSON_Failed, |
79 OnJSONParseFailed) | 79 OnJSONParseFailed) |
80 IPC_MESSAGE_UNHANDLED(handled = false) | 80 IPC_MESSAGE_UNHANDLED(handled = false) |
81 IPC_END_MESSAGE_MAP() | 81 IPC_END_MESSAGE_MAP() |
82 return handled; | 82 return handled; |
83 } | 83 } |
OLD | NEW |