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

Unified Diff: mojo/public/utility/scoped_handle.h

Issue 56553002: Say "noto" goto (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move scoped_handle into new mojo_utility static library Created 7 years, 1 month 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 | « mojo/mojo.gyp ('k') | mojo/public/utility/scoped_handle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/utility/scoped_handle.h
diff --git a/mojo/public/utility/scoped_handle.h b/mojo/public/utility/scoped_handle.h
new file mode 100644
index 0000000000000000000000000000000000000000..8135a43ffdd567509fcc62efe50a955ed3a201dd
--- /dev/null
+++ b/mojo/public/utility/scoped_handle.h
@@ -0,0 +1,28 @@
+// Copyright 2013 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.
+
+#ifndef MOJO_PUBLIC_UTILITY_SCOPED_HANDLE_H_
+#define MOJO_PUBLIC_UTILITY_SCOPED_HANDLE_H_
+
+#include "mojo/public/system/core.h"
+#include "mojo/public/system/system_export.h"
darin (slow to review) 2013/11/01 23:05:13 LGTM w/ this line and the MOJO_SYSTEM_EXPORT remov
+
+namespace mojo {
+
+// Closes handle_ when deleted.
+// This probably wants tons of improvements, but those can be made as needed.
+class MOJO_SYSTEM_EXPORT ScopedHandle {
darin (slow to review) 2013/11/01 23:04:52 nit: no need for the export. this is a static libr
+ public:
+ ScopedHandle(Handle handle);
+ ~ScopedHandle();
+ Handle get() const { return handle_; }
+ Handle Release();
+
+ private:
+ Handle handle_;
+};
+
+} // namespace mojo
+
+#endif // MOJO_PUBLIC_SYSTEM_SCOPED_HANDLE_H_
« no previous file with comments | « mojo/mojo.gyp ('k') | mojo/public/utility/scoped_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698