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

Unified Diff: mojo/edk/system/node_controller.h

Issue 2043713004: Mojo: Add NotifyBadMessage API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: mojo/edk/system/node_controller.h
diff --git a/mojo/edk/system/node_controller.h b/mojo/edk/system/node_controller.h
index 7c244f6771ff770e2bc108a84d712512ea77aedd..9e98e366ed73a1f4b069c02c4f28b962b2ca5440 100644
--- a/mojo/edk/system/node_controller.h
+++ b/mojo/edk/system/node_controller.h
@@ -74,7 +74,8 @@ class NodeController : public ports::NodeDelegate,
// Connects this node to a child node. This node will initiate a handshake.
void ConnectToChild(base::ProcessHandle process_handle,
ScopedPlatformHandle platform_handle,
- const std::string& child_token);
+ const std::string& child_token,
+ const base::Closure& bad_message_callback);
// Closes all reserved ports which associated with the child process
// |child_token|.
@@ -121,6 +122,10 @@ class NodeController : public ports::NodeDelegate,
// transfer.
void RequestShutdown(const base::Closure& callback);
+ // Notifies the NodeController that we received a bad message from the given
+ // node.
+ void NotifyBadMessageFrom(const ports::NodeName& source_node);
+
private:
friend Core;
@@ -135,7 +140,8 @@ class NodeController : public ports::NodeDelegate,
void ConnectToChildOnIOThread(base::ProcessHandle process_handle,
ScopedPlatformHandle platform_handle,
- ports::NodeName token);
+ ports::NodeName token,
+ const base::Closure& bad_message_callback);
void ConnectToParentOnIOThread(ScopedPlatformHandle platform_handle);
scoped_refptr<NodeChannel> GetPeerChannel(const ports::NodeName& name);
@@ -190,6 +196,9 @@ class NodeController : public ports::NodeDelegate,
base::ProcessHandle from_process,
const ports::NodeName& destination,
Channel::MessagePtr message) override;
+ void OnPortsMessageFromRelay(const ports::NodeName& from_node,
+ const ports::NodeName& source_node,
+ Channel::MessagePtr message) override;
#endif
void OnChannelError(const ports::NodeName& from_node) override;
#if defined(OS_MACOSX) && !defined(OS_IOS)

Powered by Google App Engine
This is Rietveld 408576698