OLD | NEW |
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 #ifndef LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_H_ | 5 #ifndef LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_H_ |
6 #define LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_H_ | 6 #define LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "nacl_io/filesystem.h" | 9 #include "nacl_io/filesystem.h" |
10 #include "nacl_io/pepper_interface.h" | 10 #include "nacl_io/pepper_interface.h" |
11 #include "nacl_io/typed_fs_factory.h" | 11 #include "nacl_io/typed_fs_factory.h" |
12 | 12 |
13 namespace nacl_io { | 13 namespace nacl_io { |
14 | 14 |
15 std::string NormalizeHeaderKey(const std::string& s); | 15 std::string NormalizeHeaderKey(const std::string& s); |
16 | 16 |
17 class HttpFs : public Filesystem { | 17 class HttpFs : public Filesystem { |
18 public: | 18 public: |
19 typedef std::map<std::string, ScopedNode> NodeMap_t; | 19 typedef std::map<std::string, ScopedNode> NodeMap_t; |
20 | 20 |
21 virtual Error Open(const Path& path, int mode, ScopedNode* out_node); | 21 virtual Error OpenWithMode(const Path& path, int open_flags, mode_t mode, |
| 22 ScopedNode* out_node); |
22 virtual Error Unlink(const Path& path); | 23 virtual Error Unlink(const Path& path); |
23 virtual Error Mkdir(const Path& path, int permissions); | 24 virtual Error Mkdir(const Path& path, int permissions); |
24 virtual Error Rmdir(const Path& path); | 25 virtual Error Rmdir(const Path& path); |
25 virtual Error Remove(const Path& path); | 26 virtual Error Remove(const Path& path); |
26 virtual Error Rename(const Path& path, const Path& newpath); | 27 virtual Error Rename(const Path& path, const Path& newpath); |
27 | 28 |
28 PP_Resource MakeUrlRequestInfo(const std::string& url, | 29 PP_Resource MakeUrlRequestInfo(const std::string& url, |
29 const char* method, | 30 const char* method, |
30 StringMap_t* additional_headers); | 31 StringMap_t* additional_headers); |
31 | 32 |
(...skipping 24 matching lines...) Expand all Loading... |
56 bool cache_content_; | 57 bool cache_content_; |
57 bool is_blob_url_; | 58 bool is_blob_url_; |
58 | 59 |
59 friend class TypedFsFactory<HttpFs>; | 60 friend class TypedFsFactory<HttpFs>; |
60 friend class HttpFsNode; | 61 friend class HttpFsNode; |
61 }; | 62 }; |
62 | 63 |
63 } // namespace nacl_io | 64 } // namespace nacl_io |
64 | 65 |
65 #endif // LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_H_ | 66 #endif // LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_H_ |
OLD | NEW |