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

Side by Side Diff: net/base/io_buffer.h

Issue 169193002: Convert scoped_ptr_malloc -> scoped_ptr, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 9 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
« no previous file with comments | « media/audio/mac/audio_manager_mac.cc ('k') | net/cert/cert_verify_proc_nss.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 NET_BASE_IO_BUFFER_H_ 5 #ifndef NET_BASE_IO_BUFFER_H_
6 #define NET_BASE_IO_BUFFER_H_ 6 #define NET_BASE_IO_BUFFER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // |offset| moves the |data_| pointer, allowing "seeking" in the data. 196 // |offset| moves the |data_| pointer, allowing "seeking" in the data.
197 void set_offset(int offset); 197 void set_offset(int offset);
198 int offset() { return offset_; } 198 int offset() { return offset_; }
199 199
200 int RemainingCapacity(); 200 int RemainingCapacity();
201 char* StartOfBuffer(); 201 char* StartOfBuffer();
202 202
203 private: 203 private:
204 virtual ~GrowableIOBuffer(); 204 virtual ~GrowableIOBuffer();
205 205
206 scoped_ptr_malloc<char> real_data_; 206 scoped_ptr<char, base::FreeDeleter> real_data_;
207 int capacity_; 207 int capacity_;
208 int offset_; 208 int offset_;
209 }; 209 };
210 210
211 // This versions allows a pickle to be used as the storage for a write-style 211 // This versions allows a pickle to be used as the storage for a write-style
212 // operation, avoiding an extra data copy. 212 // operation, avoiding an extra data copy.
213 class NET_EXPORT PickledIOBuffer : public IOBuffer { 213 class NET_EXPORT PickledIOBuffer : public IOBuffer {
214 public: 214 public:
215 PickledIOBuffer(); 215 PickledIOBuffer();
216 216
(...skipping 18 matching lines...) Expand all
235 public: 235 public:
236 explicit WrappedIOBuffer(const char* data); 236 explicit WrappedIOBuffer(const char* data);
237 237
238 protected: 238 protected:
239 virtual ~WrappedIOBuffer(); 239 virtual ~WrappedIOBuffer();
240 }; 240 };
241 241
242 } // namespace net 242 } // namespace net
243 243
244 #endif // NET_BASE_IO_BUFFER_H_ 244 #endif // NET_BASE_IO_BUFFER_H_
OLDNEW
« no previous file with comments | « media/audio/mac/audio_manager_mac.cc ('k') | net/cert/cert_verify_proc_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698