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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/pepper_interface.cc

Issue 19717004: [NaCl SDK] Add nacl_io and sdk_util namespaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad copyright in mount_mem Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 #include "nacl_io/pepper_interface.h" 5 #include "nacl_io/pepper_interface.h"
6 #include <errno.h> 6 #include <errno.h>
7 #include <ppapi/c/pp_errors.h> 7 #include <ppapi/c/pp_errors.h>
8 8
9 namespace nacl_io {
10
9 ScopedResource::ScopedResource(PepperInterface* ppapi, PP_Resource resource) 11 ScopedResource::ScopedResource(PepperInterface* ppapi, PP_Resource resource)
10 : ppapi_(ppapi), 12 : ppapi_(ppapi),
11 resource_(resource) { 13 resource_(resource) {
12 } 14 }
13 15
14 ScopedResource::~ScopedResource() { 16 ScopedResource::~ScopedResource() {
15 if (resource_) 17 if (resource_)
16 ppapi_->ReleaseResource(resource_); 18 ppapi_->ReleaseResource(resource_);
17 } 19 }
18 20
(...skipping 27 matching lines...) Expand all
46 case PP_ERROR_USERCANCEL: return EPERM; 48 case PP_ERROR_USERCANCEL: return EPERM;
47 case PP_ERROR_NO_USER_GESTURE: return EPERM; 49 case PP_ERROR_NO_USER_GESTURE: return EPERM;
48 case PP_ERROR_CONTEXT_LOST: return EPERM; 50 case PP_ERROR_CONTEXT_LOST: return EPERM;
49 case PP_ERROR_NO_MESSAGE_LOOP: return EPERM; 51 case PP_ERROR_NO_MESSAGE_LOOP: return EPERM;
50 case PP_ERROR_WRONG_THREAD: return EPERM; 52 case PP_ERROR_WRONG_THREAD: return EPERM;
51 } 53 }
52 54
53 return EINVAL; 55 return EINVAL;
54 } 56 }
55 57
58 } // namespace nacl_io
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698