diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-14 19:55:23 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-14 19:55:23 +0000 |
commit | 5f9205f215b19ab7ee4842fdc9820743b1061de6 (patch) | |
tree | c1a0b69293d43c0e47c722409dcc6a23ac47ec14 /net/http/http_pipelined_stream.h | |
parent | 4e402ec675af5dcff41e206ff9d0d985aceaab07 (diff) | |
download | chromium_src-5f9205f215b19ab7ee4842fdc9820743b1061de6.zip chromium_src-5f9205f215b19ab7ee4842fdc9820743b1061de6.tar.gz chromium_src-5f9205f215b19ab7ee4842fdc9820743b1061de6.tar.bz2 |
Make HttpStream take a scoped_ptr<UploadDataStream>, to clearly communicate transfer of ownership
HttpStream assumes ownership of the passed in UploadDataStream when
SendRequest is called. However, there existed a few call sites where the
passed in UploadDataStream may have been leaked, primarily during error
handling. Using scoped_ptr<> & Pass() provide clear API-level contracts as
to the ownership of pointers.
BUG=none
TEST=existing
R=willchan@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10539137
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142211 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_pipelined_stream.h')
-rw-r--r-- | net/http/http_pipelined_stream.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http/http_pipelined_stream.h b/net/http/http_pipelined_stream.h index 83fca26..ee60ce5 100644 --- a/net/http/http_pipelined_stream.h +++ b/net/http/http_pipelined_stream.h @@ -44,7 +44,7 @@ class HttpPipelinedStream : public HttpStream { const CompletionCallback& callback) OVERRIDE; virtual int SendRequest(const HttpRequestHeaders& headers, - UploadDataStream* request_body, + scoped_ptr<UploadDataStream> request_body, HttpResponseInfo* response, const CompletionCallback& callback) OVERRIDE; |