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

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

Issue 16325024: Move thread_pool.h into utils so it can be shared by more than one example. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 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 5
6 #include "nacl_io/mount_node_html5fs.h" 6 #include "nacl_io/mount_node_html5fs.h"
7 7
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <ppapi/c/pp_completion_callback.h> 10 #include <ppapi/c/pp_completion_callback.h>
11 #include <ppapi/c/pp_directory_entry.h> 11 #include <ppapi/c/pp_directory_entry.h>
12 #include <ppapi/c/pp_errors.h> 12 #include <ppapi/c/pp_errors.h>
13 #include <ppapi/c/pp_file_info.h> 13 #include <ppapi/c/pp_file_info.h>
14 #include <ppapi/c/ppb_file_io.h> 14 #include <ppapi/c/ppb_file_io.h>
15 #include <string.h> 15 #include <string.h>
16 #include <vector> 16 #include <vector>
17 #include "nacl_io/mount.h" 17 #include "nacl_io/mount.h"
18 #include "nacl_io/osdirent.h" 18 #include "nacl_io/osdirent.h"
19 #include "nacl_io/pepper_interface.h" 19 #include "nacl_io/pepper_interface.h"
20 #include "utils/auto_lock.h" 20 #include "sdk_util/auto_lock.h"
21 21
22 namespace { 22 namespace {
23 23
24 struct OutputBuffer { 24 struct OutputBuffer {
25 void* data; 25 void* data;
26 int element_count; 26 int element_count;
27 }; 27 };
28 28
29 void* GetOutputBuffer(void* user_data, uint32_t count, uint32_t size) { 29 void* GetOutputBuffer(void* user_data, uint32_t count, uint32_t size) {
30 OutputBuffer* output = static_cast<OutputBuffer*>(user_data); 30 OutputBuffer* output = static_cast<OutputBuffer*>(user_data);
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 if (fileio_resource_) { 287 if (fileio_resource_) {
288 mount_->ppapi()->GetFileIoInterface()->Close(fileio_resource_); 288 mount_->ppapi()->GetFileIoInterface()->Close(fileio_resource_);
289 mount_->ppapi()->ReleaseResource(fileio_resource_); 289 mount_->ppapi()->ReleaseResource(fileio_resource_);
290 } 290 }
291 291
292 mount_->ppapi()->ReleaseResource(fileref_resource_); 292 mount_->ppapi()->ReleaseResource(fileref_resource_);
293 fileio_resource_ = 0; 293 fileio_resource_ = 0;
294 fileref_resource_ = 0; 294 fileref_resource_ = 0;
295 MountNode::Destroy(); 295 MountNode::Destroy();
296 } 296 }
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/mount_node_dir.cc ('k') | native_client_sdk/src/libraries/nacl_io/mount_node_mem.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698