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

Unified Diff: base/file_descriptor_posix.h

Issue 661237: This adds in the ability for Chrome to generate windows with snapshots of all... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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
« no previous file with comments | « app/x11_util.cc ('k') | chrome/browser/browser_init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_descriptor_posix.h
===================================================================
--- base/file_descriptor_posix.h (revision 45523)
+++ base/file_descriptor_posix.h (working copy)
@@ -24,6 +24,15 @@
: fd(ifd),
auto_close(iauto_close) { }
+ bool operator==(const FileDescriptor& other) const {
+ return (fd == other.fd && auto_close == other.auto_close);
+ }
+
+ // A comparison operator so that we can use these as keys in a std::map.
+ bool operator<(const FileDescriptor& other) const {
+ return other.fd < fd;
+ }
+
int fd;
// If true, this file descriptor should be closed after it has been used. For
// example an IPC system might interpret this flag as indicating that the
« no previous file with comments | « app/x11_util.cc ('k') | chrome/browser/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698