OLD | NEW |
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_html5fs.h" | 6 #include "nacl_io/mount_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_errors.h> | 11 #include <ppapi/c/pp_errors.h> |
12 #include <stdlib.h> | 12 #include <stdlib.h> |
13 #include <string.h> | 13 #include <string.h> |
14 #include <algorithm> | 14 #include <algorithm> |
15 #include "nacl_io/mount_node_html5fs.h" | 15 #include "nacl_io/mount_node_html5fs.h" |
16 #include "sdk_util/auto_lock.h" | 16 #include "sdk_util/auto_lock.h" |
17 | 17 |
| 18 namespace nacl_io { |
| 19 |
18 namespace { | 20 namespace { |
19 | 21 |
20 #if defined(WIN32) | 22 #if defined(WIN32) |
21 int64_t strtoull(const char* nptr, char** endptr, int base) { | 23 int64_t strtoull(const char* nptr, char** endptr, int base) { |
22 return _strtoui64(nptr, endptr, base); | 24 return _strtoui64(nptr, endptr, base); |
23 } | 25 } |
24 #endif | 26 #endif |
25 | 27 |
26 } // namespace | 28 } // namespace |
27 | 29 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 self->FilesystemOpenCallback(result); | 180 self->FilesystemOpenCallback(result); |
179 } | 181 } |
180 | 182 |
181 void MountHtml5Fs::FilesystemOpenCallback(int32_t result) { | 183 void MountHtml5Fs::FilesystemOpenCallback(int32_t result) { |
182 AUTO_LOCK(filesysem_open_lock_); | 184 AUTO_LOCK(filesysem_open_lock_); |
183 filesystem_open_has_result_ = true; | 185 filesystem_open_has_result_ = true; |
184 filesystem_open_error_ = PPErrorToErrno(result); | 186 filesystem_open_error_ = PPErrorToErrno(result); |
185 pthread_cond_signal(&filesystem_open_cond_); | 187 pthread_cond_signal(&filesystem_open_cond_); |
186 } | 188 } |
187 | 189 |
| 190 } // namespace nacl_io |
| 191 |
OLD | NEW |