summaryrefslogtreecommitdiffstats
path: root/net/socket_stream
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-21 15:47:19 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-21 15:47:19 +0000
commit6d22a976f77187252164baa27100e472d5a924b5 (patch)
treed974359a0499559b934c3df79657ce31cdbbfbe2 /net/socket_stream
parent6b5fed239714be750caaad431193f34ce7ea6ff4 (diff)
downloadchromium_src-6d22a976f77187252164baa27100e472d5a924b5.zip
chromium_src-6d22a976f77187252164baa27100e472d5a924b5.tar.gz
chromium_src-6d22a976f77187252164baa27100e472d5a924b5.tar.bz2
Reduce static initializers by removing inline constructors and
destructors from classes with instance members of type scoped_ptr_malloc<> Also remove #include of iostream from remaining header file. Review URL: http://codereview.chromium.org/2861065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket_stream')
-rw-r--r--net/socket_stream/socket_stream.cc4
-rw-r--r--net/socket_stream/socket_stream.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/net/socket_stream/socket_stream.cc b/net/socket_stream/socket_stream.cc
index d4ad1f9..d1ead09 100644
--- a/net/socket_stream/socket_stream.cc
+++ b/net/socket_stream/socket_stream.cc
@@ -35,6 +35,9 @@ static const int kReadBufferSize = 4096;
namespace net {
+SocketStream::ResponseHeaders::ResponseHeaders() : IOBuffer() {}
+SocketStream::ResponseHeaders::~ResponseHeaders() { data_ = NULL; }
+
void SocketStream::ResponseHeaders::Realloc(size_t new_size) {
headers_.reset(static_cast<char*>(realloc(headers_.release(), new_size)));
}
@@ -987,3 +990,4 @@ ProxyService* SocketStream::proxy_service() const {
}
} // namespace net
+
diff --git a/net/socket_stream/socket_stream.h b/net/socket_stream/socket_stream.h
index fcedc0d..d0e8b2e 100644
--- a/net/socket_stream/socket_stream.h
+++ b/net/socket_stream/socket_stream.h
@@ -170,7 +170,7 @@ class SocketStream : public base::RefCountedThreadSafe<SocketStream> {
class ResponseHeaders : public IOBuffer {
public:
- ResponseHeaders() : IOBuffer() {}
+ ResponseHeaders();
void SetDataOffset(size_t offset) { data_ = headers_.get() + offset; }
char* headers() const { return headers_.get(); }
@@ -178,7 +178,7 @@ class SocketStream : public base::RefCountedThreadSafe<SocketStream> {
void Realloc(size_t new_size);
private:
- ~ResponseHeaders() { data_ = NULL; }
+ ~ResponseHeaders();
scoped_ptr_malloc<char> headers_;
};