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

Unified Diff: mojo/public/cpp/system/handle.h

Issue 2031823002: Mojo C++ bindings: more consistent Clone() and Equals(). (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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/system/handle.h
diff --git a/mojo/public/cpp/system/handle.h b/mojo/public/cpp/system/handle.h
index f83a9226f1891e2904341f54d01c75d32bfb8678..d0466b0ddead9ae80b1b8e95964df058fda19b37 100644
--- a/mojo/public/cpp/system/handle.h
+++ b/mojo/public/cpp/system/handle.h
@@ -122,6 +122,10 @@ class ScopedHandleBase {
bool is_valid() const { return handle_.is_valid(); }
+ bool operator==(const ScopedHandleBase& other) const {
+ return handle_.value() == other.get().value();
+ }
+
private:
void CloseIfNecessary() {
if (handle_.is_valid())
« no previous file with comments | « mojo/public/cpp/bindings/wtf_array.h ('k') | mojo/public/interfaces/bindings/tests/struct_with_traits.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698