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

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

Issue 1467953002: Implement MessagePumpMojo using WaitSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-waitset-implementation
Patch Set: Fix component builds. Created 5 years 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 45624bc66d80c2170637c7e86d4a21b4dc0a3487..1c3b149797af15eff06de555adf7b555d4210e1a 100644
--- a/mojo/public/cpp/system/handle.h
+++ b/mojo/public/cpp/system/handle.h
@@ -285,6 +285,11 @@ inline bool operator<(const Handle a, const Handle b) {
return a.value() < b.value();
}
+// Comparison, so that |Handle|s can be used as keys in hash maps.
+inline bool operator==(const Handle a, const Handle b) {
+ return a.value() == b.value();
+}
+
} // namespace mojo
#endif // MOJO_PUBLIC_CPP_SYSTEM_HANDLE_H_

Powered by Google App Engine
This is Rietveld 408576698