OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_MOUNT_NODE_HTTP_H_ | 5 #ifndef LIBRARIES_NACL_IO_MOUNT_NODE_HTTP_H_ |
6 #define LIBRARIES_NACL_IO_MOUNT_NODE_HTTP_H_ | 6 #define LIBRARIES_NACL_IO_MOUNT_NODE_HTTP_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 private: | 45 private: |
46 Error OpenUrl(const char* method, | 46 Error OpenUrl(const char* method, |
47 StringMap_t* request_headers, | 47 StringMap_t* request_headers, |
48 PP_Resource* out_loader, | 48 PP_Resource* out_loader, |
49 PP_Resource* out_request, | 49 PP_Resource* out_request, |
50 PP_Resource* out_response, | 50 PP_Resource* out_response, |
51 int32_t* out_statuscode, | 51 int32_t* out_statuscode, |
52 StringMap_t* out_response_headers); | 52 StringMap_t* out_response_headers); |
53 | 53 |
54 Error DownloadToCache(); | 54 Error DownloadToCache(); |
55 Error ReadPartialFromCache(size_t offs, | 55 Error ReadPartialFromCache(const HandleAttr& attr, |
56 void* buf, | 56 void* buf, |
57 int count, | 57 int count, |
58 int* out_bytes); | 58 int* out_bytes); |
59 Error DownloadPartial(size_t offs, void* buf, size_t count, int* out_bytes); | 59 Error DownloadPartial(const HandleAttr& attr, |
| 60 void* buf, |
| 61 size_t count, |
| 62 int* out_bytes); |
60 Error DownloadToBuffer(PP_Resource loader, | 63 Error DownloadToBuffer(PP_Resource loader, |
61 void* buf, | 64 void* buf, |
62 int count, | 65 int count, |
63 int* out_bytes); | 66 int* out_bytes); |
64 | 67 |
65 std::string url_; | 68 std::string url_; |
66 std::vector<char> buffer_; | 69 std::vector<char> buffer_; |
67 | 70 |
68 bool cache_content_; | 71 bool cache_content_; |
69 bool has_cached_size_; | 72 bool has_cached_size_; |
70 std::vector<char> cached_data_; | 73 std::vector<char> cached_data_; |
71 | 74 |
72 friend class MountHttp; | 75 friend class MountHttp; |
73 }; | 76 }; |
74 | 77 |
75 } // namespace nacl_io | 78 } // namespace nacl_io |
76 | 79 |
77 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_HTTP_H_ | 80 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_HTTP_H_ |
OLD | NEW |