Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: components/safe_json/safe_json_parser.cc

Issue 1211793002: Rename safe_json_parser component to safe_json. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "components/safe_json_parser/safe_json_parser.h" 5 #include "components/safe_json/safe_json_parser.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
11 #include "base/tuple.h" 11 #include "base/tuple.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "components/safe_json_parser/safe_json_parser_messages.h" 13 #include "components/safe_json/safe_json_parser_messages.h"
14 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
15 #include "content/public/browser/utility_process_host.h" 15 #include "content/public/browser/utility_process_host.h"
16 #include "grit/components_strings.h" 16 #include "grit/components_strings.h"
17 #include "ipc/ipc_message_macros.h" 17 #include "ipc/ipc_message_macros.h"
18 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
19 19
20 using content::BrowserThread; 20 using content::BrowserThread;
21 using content::UtilityProcessHost; 21 using content::UtilityProcessHost;
22 22
23 namespace safe_json_parser { 23 namespace safe_json {
24 24
25 SafeJsonParser::SafeJsonParser(const std::string& unsafe_json, 25 SafeJsonParser::SafeJsonParser(const std::string& unsafe_json,
26 const SuccessCallback& success_callback, 26 const SuccessCallback& success_callback,
27 const ErrorCallback& error_callback) 27 const ErrorCallback& error_callback)
28 : unsafe_json_(unsafe_json), 28 : unsafe_json_(unsafe_json),
29 success_callback_(success_callback), 29 success_callback_(success_callback),
30 error_callback_(error_callback) { 30 error_callback_(error_callback) {
31 } 31 }
32 32
33 void SafeJsonParser::Start() { 33 void SafeJsonParser::Start() {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 IPC_BEGIN_MESSAGE_MAP(SafeJsonParser, message) 88 IPC_BEGIN_MESSAGE_MAP(SafeJsonParser, message)
89 IPC_MESSAGE_HANDLER(SafeJsonParserHostMsg_ParseJSON_Succeeded, 89 IPC_MESSAGE_HANDLER(SafeJsonParserHostMsg_ParseJSON_Succeeded,
90 OnJSONParseSucceeded) 90 OnJSONParseSucceeded)
91 IPC_MESSAGE_HANDLER(SafeJsonParserHostMsg_ParseJSON_Failed, 91 IPC_MESSAGE_HANDLER(SafeJsonParserHostMsg_ParseJSON_Failed,
92 OnJSONParseFailed) 92 OnJSONParseFailed)
93 IPC_MESSAGE_UNHANDLED(handled = false) 93 IPC_MESSAGE_UNHANDLED(handled = false)
94 IPC_END_MESSAGE_MAP() 94 IPC_END_MESSAGE_MAP()
95 return handled; 95 return handled;
96 } 96 }
97 97
98 } // namespace safe_json_parser 98 } // namespace safe_json
OLDNEW
« no previous file with comments | « components/safe_json/safe_json_parser.h ('k') | components/safe_json/safe_json_parser_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698