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

Side by Side Diff: components/safe_json/safe_json_parser_message_filter.h

Issue 1948303002: Re-land: Convert the utility process JSON parser into a Mojo service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_MESSAGE_FILTER_H_
6 #define COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_MESSAGE_FILTER_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11
12 namespace IPC {
13 class Message;
14 } // namespace IPC
15
16 namespace safe_json {
17
18 // A Handler for the ParseJSON IPC message that does the actual JSON parsing
19 // in the sandboxed process. Modelled after IPC::MessageFilter but does not
20 // directly implement it as it will be used by an adapter class under
21 // //chrome/utility.
22 class SafeJsonParserMessageFilter {
23 public:
24 SafeJsonParserMessageFilter();
25 ~SafeJsonParserMessageFilter();
26 // Returns true if it receives a message it could handle (currently
27 // only SafeJsonParserMsg_ParseJSON), false otherwise.
28 bool OnMessageReceived(const IPC::Message& message);
29
30 private:
31 void OnParseJSON(const std::string& json);
32
33 DISALLOW_COPY_AND_ASSIGN(SafeJsonParserMessageFilter);
34 };
35
36 } // namespace safe_json
37
38 #endif // COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_MESSAGE_FILTER_H_
OLDNEW
« no previous file with comments | « components/safe_json/safe_json_parser_impl.cc ('k') | components/safe_json/safe_json_parser_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698