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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc

Issue 565763002: Plumbing though mode parameter to open, since fusefs can make use of it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 6 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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/html5fs/html5_fs.h" 5 #include "nacl_io/html5fs/html5_fs.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 11 matching lines...) Expand all
22 namespace { 22 namespace {
23 23
24 #if defined(WIN32) 24 #if defined(WIN32)
25 int64_t strtoull(const char* nptr, char** endptr, int base) { 25 int64_t strtoull(const char* nptr, char** endptr, int base) {
26 return _strtoui64(nptr, endptr, base); 26 return _strtoui64(nptr, endptr, base);
27 } 27 }
28 #endif 28 #endif
29 29
30 } // namespace 30 } // namespace
31 31
32 Error Html5Fs::Open(const Path& path, int open_flags, ScopedNode* out_node) { 32 Error Html5Fs::OpenWithMode(const Path& path, int open_flags, mode_t mode,
33 ScopedNode* out_node) {
33 out_node->reset(NULL); 34 out_node->reset(NULL);
34 Error error = BlockUntilFilesystemOpen(); 35 Error error = BlockUntilFilesystemOpen();
35 if (error) 36 if (error)
36 return error; 37 return error;
37 38
38 PP_Resource fileref = file_ref_iface_->Create( 39 PP_Resource fileref = file_ref_iface_->Create(
39 filesystem_resource_, GetFullPath(path).Join().c_str()); 40 filesystem_resource_, GetFullPath(path).Join().c_str());
40 if (!fileref) 41 if (!fileref)
41 return ENOENT; 42 return ENOENT;
42 43
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } 292 }
292 293
293 void Html5Fs::FilesystemOpenCallback(int32_t result) { 294 void Html5Fs::FilesystemOpenCallback(int32_t result) {
294 AUTO_LOCK(filesysem_open_lock_); 295 AUTO_LOCK(filesysem_open_lock_);
295 filesystem_open_has_result_ = true; 296 filesystem_open_has_result_ = true;
296 filesystem_open_error_ = PPErrorToErrno(result); 297 filesystem_open_error_ = PPErrorToErrno(result);
297 pthread_cond_signal(&filesystem_open_cond_); 298 pthread_cond_signal(&filesystem_open_cond_);
298 } 299 }
299 300
300 } // namespace nacl_io 301 } // namespace nacl_io
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.h ('k') | native_client_sdk/src/libraries/nacl_io/httpfs/http_fs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698