Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.h

Issue 605433003: [NaCl SDK] nacl_io: Fix gaping memory leaks in memfs and htmlfs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_nacl_io
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 24 matching lines...) Expand all
35 size_t count, 35 size_t count,
36 int* out_bytes); 36 int* out_bytes);
37 37
38 void SetCachedSize(off_t size); 38 void SetCachedSize(off_t size);
39 39
40 protected: 40 protected:
41 HttpFsNode(Filesystem* filesystem, 41 HttpFsNode(Filesystem* filesystem,
42 const std::string& url, 42 const std::string& url,
43 bool cache_content); 43 bool cache_content);
44 44
45 virtual ~HttpFsNode();
46
45 private: 47 private:
46 Error GetStat_Locked(struct stat* stat); 48 Error GetStat_Locked(struct stat* stat);
47 Error OpenUrl(const char* method, 49 Error OpenUrl(const char* method,
48 StringMap_t* request_headers, 50 StringMap_t* request_headers,
49 ScopedResource* out_loader, 51 ScopedResource* out_loader,
50 ScopedResource* out_request, 52 ScopedResource* out_request,
51 ScopedResource* out_response, 53 ScopedResource* out_response,
52 int32_t* out_statuscode, 54 int32_t* out_statuscode,
53 StringMap_t* out_response_headers); 55 StringMap_t* out_response_headers);
54 56
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 bool cache_content_; 92 bool cache_content_;
91 bool has_cached_size_; 93 bool has_cached_size_;
92 std::vector<char> cached_data_; 94 std::vector<char> cached_data_;
93 95
94 friend class HttpFs; 96 friend class HttpFs;
95 }; 97 };
96 98
97 } // namespace nacl_io 99 } // namespace nacl_io
98 100
99 #endif // LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_NODE_H_ 101 #endif // LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_NODE_H_
OLDNEW
« no previous file with comments | « no previous file | native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698