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

Unified Diff: base/files/scoped_platform_handle_posix.cc

Issue 2705743002: Introduce base::ScopedPlatformHandle (Closed)
Patch Set: . Created 3 years, 10 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 | « base/files/scoped_platform_handle.cc ('k') | base/files/scoped_platform_handle_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/scoped_platform_handle_posix.cc
diff --git a/base/files/scoped_platform_handle_posix.cc b/base/files/scoped_platform_handle_posix.cc
new file mode 100644
index 0000000000000000000000000000000000000000..38ee85a66ba608203ae2d1445844408e309bcd5b
--- /dev/null
+++ b/base/files/scoped_platform_handle_posix.cc
@@ -0,0 +1,25 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/files/scoped_platform_handle.h"
+
+namespace base {
+
+bool ScopedPlatformHandle::is_valid() const {
+ return handle_.is_valid();
+}
+
+void ScopedPlatformHandle::reset() {
+ handle_.reset();
+}
+
+ScopedPlatformHandle::HandleType ScopedPlatformHandle::get() const {
+ return handle_.get();
+}
+
+ScopedPlatformHandle::HandleType ScopedPlatformHandle::release() {
+ return handle_.release();
+}
+
+} // namespace base
« no previous file with comments | « base/files/scoped_platform_handle.cc ('k') | base/files/scoped_platform_handle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698