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

Unified Diff: mojo/public/cpp/bindings/lib/connector.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/public/cpp/bindings/lib/connector.h
diff --git a/mojo/public/cpp/bindings/lib/connector.h b/mojo/public/cpp/bindings/lib/connector.h
index 243159ef32fdbe0417824bd0a50431a39903f96a..16d612b948fc75a6b095eeaff606bb26d167522b 100644
--- a/mojo/public/cpp/bindings/lib/connector.h
+++ b/mojo/public/cpp/bindings/lib/connector.h
@@ -6,6 +6,7 @@
#define MOJO_PUBLIC_CPP_BINDINGS_LIB_CONNECTOR_H_
#include <memory>
+#include <string>
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
@@ -57,6 +58,9 @@ class Connector : public MessageReceiver {
incoming_receiver_ = receiver;
}
+ // Sets the interface name for this connector. Used only for debugging.
+ void set_interface_name(const std::string& name) { interface_name_ = name; }
+
// Errors from incoming receivers will force the connector into an error
// state, where no more messages will be processed. This method is used
// during testing to prevent that from happening.
@@ -187,6 +191,9 @@ class Connector : public MessageReceiver {
bool paused_;
+ // The name of the interface bound to this connector. Used for debugging only.
+ std::string interface_name_;
+
// If sending messages is allowed from multiple threads, |lock_| is used to
// protect modifications to |message_pipe_| and |drop_writes_|.
std::unique_ptr<base::Lock> lock_;

Powered by Google App Engine
This is Rietveld 408576698