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

Unified Diff: net/socket_stream/socket_stream.h

Issue 368001: Second patch in making destructors of refcounted objects private. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
Index: net/socket_stream/socket_stream.h
===================================================================
--- net/socket_stream/socket_stream.h (revision 31079)
+++ net/socket_stream/socket_stream.h (working copy)
@@ -140,18 +140,20 @@
class RequestHeaders : public IOBuffer {
public:
RequestHeaders() : IOBuffer() {}
- ~RequestHeaders() { data_ = NULL; }
void SetDataOffset(size_t offset) {
data_ = const_cast<char*>(headers_.data()) + offset;
}
+
std::string headers_;
+
+ private:
+ ~RequestHeaders() { data_ = NULL; }
};
class ResponseHeaders : public IOBuffer {
public:
ResponseHeaders() : IOBuffer() {}
- ~ResponseHeaders() { data_ = NULL; }
void SetDataOffset(size_t offset) { data_ = headers_.get() + offset; }
char* headers() const { return headers_.get(); }
@@ -159,6 +161,8 @@
void Realloc(size_t new_size);
private:
+ ~ResponseHeaders() { data_ = NULL; }
+
scoped_ptr_malloc<char> headers_;
};

Powered by Google App Engine
This is Rietveld 408576698