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_NODE_H_ | 5 #ifndef LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_NODE_H_ |
6 #define LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_NODE_H_ | 6 #define LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_NODE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 19 matching lines...) Expand all Loading... |
30 size_t count, | 30 size_t count, |
31 int* out_bytes); | 31 int* out_bytes); |
32 virtual Error FTruncate(off_t size); | 32 virtual Error FTruncate(off_t size); |
33 virtual Error Write(const HandleAttr& attr, | 33 virtual Error Write(const HandleAttr& attr, |
34 const void* buf, | 34 const void* buf, |
35 size_t count, | 35 size_t count, |
36 int* out_bytes); | 36 int* out_bytes); |
37 virtual Error GetSize(off_t* out_size); | 37 virtual Error GetSize(off_t* out_size); |
38 | 38 |
39 void SetCachedSize(off_t size); | 39 void SetCachedSize(off_t size); |
40 void SetMode(int mode); | |
41 | 40 |
42 protected: | 41 protected: |
43 HttpFsNode(Filesystem* filesystem, | 42 HttpFsNode(Filesystem* filesystem, |
44 const std::string& url, | 43 const std::string& url, |
45 bool cache_content); | 44 bool cache_content); |
46 | 45 |
47 private: | 46 private: |
48 Error GetStat_Locked(struct stat* stat); | 47 Error GetStat_Locked(struct stat* stat); |
49 Error OpenUrl(const char* method, | 48 Error OpenUrl(const char* method, |
50 StringMap_t* request_headers, | 49 StringMap_t* request_headers, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 bool cache_content_; | 91 bool cache_content_; |
93 bool has_cached_size_; | 92 bool has_cached_size_; |
94 std::vector<char> cached_data_; | 93 std::vector<char> cached_data_; |
95 | 94 |
96 friend class HttpFs; | 95 friend class HttpFs; |
97 }; | 96 }; |
98 | 97 |
99 } // namespace nacl_io | 98 } // namespace nacl_io |
100 | 99 |
101 #endif // LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_NODE_H_ | 100 #endif // LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_NODE_H_ |
OLD | NEW |