| Index: mojo/public/cpp/bindings/interface_request.h
|
| diff --git a/mojo/public/cpp/bindings/interface_request.h b/mojo/public/cpp/bindings/interface_request.h
|
| index 3d6b27c0a0ea976a09ca23207235b60911e393cf..26e7b53cdc1e514ec49c47bab4bb356db39e44a8 100644
|
| --- a/mojo/public/cpp/bindings/interface_request.h
|
| +++ b/mojo/public/cpp/bindings/interface_request.h
|
| @@ -55,6 +55,15 @@ class InterfaceRequest {
|
| // Removes the message pipe from the request and returns it.
|
| ScopedMessagePipeHandle PassMessagePipe() { return std::move(handle_); }
|
|
|
| + bool Equals(const InterfaceRequest& other) const {
|
| + if (this == &other)
|
| + return true;
|
| +
|
| + // Now that the two refer to different objects, they are equivalent if
|
| + // and only if they are both invalid.
|
| + return !is_pending() && !other.is_pending();
|
| + }
|
| +
|
| private:
|
| ScopedMessagePipeHandle handle_;
|
| };
|
|
|