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 #include "nacl_io/kernel_proxy.h" | 5 #include "nacl_io/kernel_proxy.h" |
6 | 6 |
7 #include <assert.h> | 7 #include <assert.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <fcntl.h> | 9 #include <fcntl.h> |
10 #include <limits.h> | 10 #include <limits.h> |
11 #include <poll.h> | 11 #include <poll.h> |
12 #include <pthread.h> | 12 #include <pthread.h> |
13 #include <stdio.h> | 13 #include <stdio.h> |
14 #include <string.h> | 14 #include <string.h> |
15 #include <sys/time.h> | 15 #include <sys/time.h> |
16 #include <unistd.h> | 16 #include <unistd.h> |
17 | 17 |
18 #include <iterator> | 18 #include <iterator> |
19 #include <string> | 19 #include <string> |
20 | 20 |
21 #include "nacl_io/devfs/dev_fs.h" | 21 #include "nacl_io/devfs/dev_fs.h" |
22 #include "nacl_io/filesystem.h" | 22 #include "nacl_io/filesystem.h" |
23 #include "nacl_io/fusefs/fuse_fs_factory.h" | 23 #include "nacl_io/fusefs/fuse_fs_factory.h" |
| 24 #include "nacl_io/googledrivefs/googledrivefs.h" |
24 #include "nacl_io/host_resolver.h" | 25 #include "nacl_io/host_resolver.h" |
25 #include "nacl_io/html5fs/html5_fs.h" | 26 #include "nacl_io/html5fs/html5_fs.h" |
26 #include "nacl_io/httpfs/http_fs.h" | 27 #include "nacl_io/httpfs/http_fs.h" |
27 #include "nacl_io/kernel_handle.h" | 28 #include "nacl_io/kernel_handle.h" |
28 #include "nacl_io/kernel_wrap_real.h" | 29 #include "nacl_io/kernel_wrap_real.h" |
29 #include "nacl_io/log.h" | 30 #include "nacl_io/log.h" |
30 #include "nacl_io/memfs/mem_fs.h" | 31 #include "nacl_io/memfs/mem_fs.h" |
31 #include "nacl_io/node.h" | 32 #include "nacl_io/node.h" |
32 #include "nacl_io/osinttypes.h" | 33 #include "nacl_io/osinttypes.h" |
33 #include "nacl_io/osmman.h" | 34 #include "nacl_io/osmman.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 Error KernelProxy::Init(PepperInterface* ppapi) { | 76 Error KernelProxy::Init(PepperInterface* ppapi) { |
76 Error rtn = 0; | 77 Error rtn = 0; |
77 ppapi_ = ppapi; | 78 ppapi_ = ppapi; |
78 dev_ = 1; | 79 dev_ = 1; |
79 | 80 |
80 factories_["memfs"] = new TypedFsFactory<MemFs>; | 81 factories_["memfs"] = new TypedFsFactory<MemFs>; |
81 factories_["dev"] = new TypedFsFactory<DevFs>; | 82 factories_["dev"] = new TypedFsFactory<DevFs>; |
82 factories_["html5fs"] = new TypedFsFactory<Html5Fs>; | 83 factories_["html5fs"] = new TypedFsFactory<Html5Fs>; |
83 factories_["httpfs"] = new TypedFsFactory<HttpFs>; | 84 factories_["httpfs"] = new TypedFsFactory<HttpFs>; |
84 factories_["passthroughfs"] = new TypedFsFactory<PassthroughFs>; | 85 factories_["passthroughfs"] = new TypedFsFactory<PassthroughFs>; |
| 86 factories_["googledrivefs"] = new TypedFsFactory<GoogleDriveFs>; |
85 | 87 |
86 ScopedFilesystem root_fs; | 88 ScopedFilesystem root_fs; |
87 rtn = MountInternal("", "/", "passthroughfs", 0, NULL, false, &root_fs); | 89 rtn = MountInternal("", "/", "passthroughfs", 0, NULL, false, &root_fs); |
88 if (rtn != 0) | 90 if (rtn != 0) |
89 return rtn; | 91 return rtn; |
90 | 92 |
91 ScopedFilesystem fs; | 93 ScopedFilesystem fs; |
92 rtn = MountInternal("", "/dev", "dev", 0, NULL, false, &fs); | 94 rtn = MountInternal("", "/dev", "dev", 0, NULL, false, &fs); |
93 if (rtn != 0) | 95 if (rtn != 0) |
94 return rtn; | 96 return rtn; |
(...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1932 errno = ENOTSOCK; | 1934 errno = ENOTSOCK; |
1933 return -1; | 1935 return -1; |
1934 } | 1936 } |
1935 | 1937 |
1936 return 0; | 1938 return 0; |
1937 } | 1939 } |
1938 | 1940 |
1939 #endif // PROVIDES_SOCKET_API | 1941 #endif // PROVIDES_SOCKET_API |
1940 | 1942 |
1941 } // namespace_nacl_io | 1943 } // namespace_nacl_io |
OLD | NEW |