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

Side by Side Diff: mojo/public/utility/scoped_handle.cc

Issue 56553002: Say "noto" goto (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: eru? 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/public/utility/scoped_handle.h ('k') | mojo/shell/app_container.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "mojo/public/utility/scoped_handle.h"
6
7 namespace mojo {
8
9 ScopedHandle::ScopedHandle(Handle handle) : handle_(handle) {
10 }
11
12 ScopedHandle::~ScopedHandle() {
13 if (handle_.value == kInvalidHandle.value)
14 return;
15 Close(handle_);
16 Release();
17 }
18
19 Handle ScopedHandle::Release() {
20 Handle temp = handle_;
21 handle_ = kInvalidHandle;
22 return temp;
23 }
24
25 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/utility/scoped_handle.h ('k') | mojo/shell/app_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698