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

Unified Diff: base/mac/scoped_mach_port.h

Issue 295933017: Add base::mac::ScopedMachPort::release() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac/scoped_mach_port.h
diff --git a/base/mac/scoped_mach_port.h b/base/mac/scoped_mach_port.h
index 0b2ac7fc6c4240cee85c20b7b713332fda716233..a98ca5ebaf854862572f89e9d567af9bce4c610f 100644
--- a/base/mac/scoped_mach_port.h
+++ b/base/mac/scoped_mach_port.h
@@ -9,6 +9,7 @@
#include "base/base_export.h"
#include "base/basictypes.h"
+#include "base/compiler_specific.h"
namespace base {
namespace mac {
@@ -32,6 +33,12 @@ class BASE_EXPORT ScopedMachPort {
return port_;
}
+ mach_port_t release() WARN_UNUSED_RESULT {
+ mach_port_t temp = port_;
+ port_ = MACH_PORT_NULL;
+ return temp;
+ }
+
private:
mach_port_t port_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698