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

Unified Diff: net/base/io_buffer.cc

Issue 6314010: Even more reordering the methods in headers and implementation in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/host_resolver_proc.cc ('k') | net/base/mapped_host_resolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/io_buffer.cc
diff --git a/net/base/io_buffer.cc b/net/base/io_buffer.cc
index dfd4d38fbdddd3dde4b3f90bebb917d49f874d77..7e5a1fe9822ae77dbf79457eb7fa69425a559851 100644
--- a/net/base/io_buffer.cc
+++ b/net/base/io_buffer.cc
@@ -52,11 +52,6 @@ DrainableIOBuffer::DrainableIOBuffer(IOBuffer* base, int size)
used_(0) {
}
-DrainableIOBuffer::~DrainableIOBuffer() {
- // The buffer is owned by the |base_| instance.
- data_ = NULL;
-}
-
void DrainableIOBuffer::DidConsume(int bytes) {
SetOffset(used_ + bytes);
}
@@ -76,16 +71,17 @@ void DrainableIOBuffer::SetOffset(int bytes) {
data_ = base_->data() + used_;
}
+DrainableIOBuffer::~DrainableIOBuffer() {
+ // The buffer is owned by the |base_| instance.
+ data_ = NULL;
+}
+
GrowableIOBuffer::GrowableIOBuffer()
: IOBuffer(),
capacity_(0),
offset_(0) {
}
-GrowableIOBuffer::~GrowableIOBuffer() {
- data_ = NULL;
-}
-
void GrowableIOBuffer::SetCapacity(int capacity) {
DCHECK(capacity >= 0);
// realloc will crash if it fails.
@@ -111,14 +107,17 @@ char* GrowableIOBuffer::StartOfBuffer() {
return real_data_.get();
}
-PickledIOBuffer::PickledIOBuffer() : IOBuffer() {}
+GrowableIOBuffer::~GrowableIOBuffer() {
+ data_ = NULL;
+}
-PickledIOBuffer::~PickledIOBuffer() { data_ = NULL; }
+PickledIOBuffer::PickledIOBuffer() : IOBuffer() {}
void PickledIOBuffer::Done() {
data_ = const_cast<char*>(static_cast<const char*>(pickle_.data()));
}
+PickledIOBuffer::~PickledIOBuffer() { data_ = NULL; }
WrappedIOBuffer::WrappedIOBuffer(const char* data)
: IOBuffer(const_cast<char*>(data)) {
« no previous file with comments | « net/base/host_resolver_proc.cc ('k') | net/base/mapped_host_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698