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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/mount_html5fs.h

Issue 18644009: [NaCl SDK] Upate atomic ops in nacl_io (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 #ifndef LIBRARIES_NACL_IO_MOUNT_HTML5FS_H_ 5 #ifndef LIBRARIES_NACL_IO_MOUNT_HTML5FS_H_
6 #define LIBRARIES_NACL_IO_MOUNT_HTML5FS_H_ 6 #define LIBRARIES_NACL_IO_MOUNT_HTML5FS_H_
7 7
8 #include <pthread.h> 8 #include <pthread.h>
9 9
10 #include "nacl_io/mount.h" 10 #include "nacl_io/mount.h"
11 #include "nacl_io/pepper_interface.h" 11 #include "nacl_io/pepper_interface.h"
12 #include "nacl_io/typed_mount_factory.h" 12 #include "nacl_io/typed_mount_factory.h"
13 #include "sdk_util/simple_lock.h"
13 14
14 class MountNode; 15 class MountNode;
15 16
16 class MountHtml5Fs : public Mount { 17 class MountHtml5Fs : public Mount {
17 public: 18 public:
18 virtual Error Access(const Path& path, int a_mode); 19 virtual Error Access(const Path& path, int a_mode);
19 virtual Error Open(const Path& path, int mode, ScopedMountNode* out_node); 20 virtual Error Open(const Path& path, int mode, ScopedMountNode* out_node);
20 virtual Error Unlink(const Path& path); 21 virtual Error Unlink(const Path& path);
21 virtual Error Mkdir(const Path& path, int permissions); 22 virtual Error Mkdir(const Path& path, int permissions);
22 virtual Error Rmdir(const Path& path); 23 virtual Error Rmdir(const Path& path);
(...skipping 10 matching lines...) Expand all
33 Error BlockUntilFilesystemOpen(); 34 Error BlockUntilFilesystemOpen();
34 35
35 private: 36 private:
36 static void FilesystemOpenCallbackThunk(void* user_data, int32_t result); 37 static void FilesystemOpenCallbackThunk(void* user_data, int32_t result);
37 void FilesystemOpenCallback(int32_t result); 38 void FilesystemOpenCallback(int32_t result);
38 39
39 PP_Resource filesystem_resource_; 40 PP_Resource filesystem_resource_;
40 bool filesystem_open_has_result_; // protected by lock_. 41 bool filesystem_open_has_result_; // protected by lock_.
41 Error filesystem_open_error_; // protected by lock_. 42 Error filesystem_open_error_; // protected by lock_.
42 pthread_cond_t filesystem_open_cond_; 43 pthread_cond_t filesystem_open_cond_;
44 SimpleLock lock_;
43 45
44 friend class TypedMountFactory<MountHtml5Fs>; 46 friend class TypedMountFactory<MountHtml5Fs>;
45 }; 47 };
46 48
47 #endif // LIBRARIES_NACL_IO_MOUNT_HTML5FS_H_ 49 #endif // LIBRARIES_NACL_IO_MOUNT_HTML5FS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698