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

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

Issue 443693002: [NaCl SDK] nacl_io: Remove use of new/delete for data buffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 int* out_bytes); 79 int* out_bytes);
80 80
81 // Read up to |count| bytes from |loader|, and store the result in |buf|, 81 // Read up to |count| bytes from |loader|, and store the result in |buf|,
82 // which is assumed to have |count| bytes free. 82 // which is assumed to have |count| bytes free.
83 Error ReadResponseToBuffer(const ScopedResource& loader, 83 Error ReadResponseToBuffer(const ScopedResource& loader,
84 void* buf, 84 void* buf,
85 int count, 85 int count,
86 int* out_bytes); 86 int* out_bytes);
87 87
88 std::string url_; 88 std::string url_;
89 std::vector<char> buffer_; 89 char* buffer_;
90 int buffer_len_;
90 91
91 bool cache_content_; 92 bool cache_content_;
92 bool has_cached_size_; 93 bool has_cached_size_;
93 std::vector<char> cached_data_; 94 std::vector<char> cached_data_;
94 95
95 friend class HttpFs; 96 friend class HttpFs;
96 }; 97 };
97 98
98 } // namespace nacl_io 99 } // namespace nacl_io
99 100
100 #endif // LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_NODE_H_ 101 #endif // LIBRARIES_NACL_IO_HTTPFS_HTTP_FS_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698