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

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

Issue 3412016: FBTF: Move a bunch of code to the headers and remove includes. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Rebase + fixed windows issues locally Created 10 years, 3 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 | « net/base/io_buffer.h ('k') | net/base/pem_tokenizer.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "net/base/io_buffer.h" 5 #include "net/base/io_buffer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace net { 9 namespace net {
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 IOBuffer::~IOBuffer() { 24 IOBuffer::~IOBuffer() {
25 delete[] data_; 25 delete[] data_;
26 } 26 }
27 27
28 IOBufferWithSize::IOBufferWithSize(int size) 28 IOBufferWithSize::IOBufferWithSize(int size)
29 : IOBuffer(size), 29 : IOBuffer(size),
30 size_(size) { 30 size_(size) {
31 } 31 }
32 32
33 IOBufferWithSize::~IOBufferWithSize() {
34 }
35
33 StringIOBuffer::StringIOBuffer(const std::string& s) 36 StringIOBuffer::StringIOBuffer(const std::string& s)
34 : IOBuffer(static_cast<char*>(NULL)), 37 : IOBuffer(static_cast<char*>(NULL)),
35 string_data_(s) { 38 string_data_(s) {
36 data_ = const_cast<char*>(string_data_.data()); 39 data_ = const_cast<char*>(string_data_.data());
37 } 40 }
38 41
39 StringIOBuffer::~StringIOBuffer() { 42 StringIOBuffer::~StringIOBuffer() {
40 // We haven't allocated the buffer, so remove it before the base class 43 // We haven't allocated the buffer, so remove it before the base class
41 // destructor tries to delete[] it. 44 // destructor tries to delete[] it.
42 data_ = NULL; 45 data_ = NULL;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 122
120 WrappedIOBuffer::WrappedIOBuffer(const char* data) 123 WrappedIOBuffer::WrappedIOBuffer(const char* data)
121 : IOBuffer(const_cast<char*>(data)) { 124 : IOBuffer(const_cast<char*>(data)) {
122 } 125 }
123 126
124 WrappedIOBuffer::~WrappedIOBuffer() { 127 WrappedIOBuffer::~WrappedIOBuffer() {
125 data_ = NULL; 128 data_ = NULL;
126 } 129 }
127 130
128 } // namespace net 131 } // namespace net
OLDNEW
« no previous file with comments | « net/base/io_buffer.h ('k') | net/base/pem_tokenizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698