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

Side by Side Diff: net/spdy/spdy_stream_test_util.cc

Issue 15829004: Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license twerk Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_stream_spdy3_unittest.cc ('k') | net/spdy/spdy_test_util_common.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/spdy/spdy_stream_test_util.h" 5 #include "net/spdy/spdy_stream_test_util.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "net/base/completion_callback.h" 10 #include "net/base/completion_callback.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 int StreamDelegateSendImmediate::OnResponseHeadersReceived( 123 int StreamDelegateSendImmediate::OnResponseHeadersReceived(
124 const SpdyHeaderBlock& response, 124 const SpdyHeaderBlock& response,
125 base::Time response_time, 125 base::Time response_time,
126 int status) { 126 int status) {
127 status = 127 status =
128 StreamDelegateBase::OnResponseHeadersReceived( 128 StreamDelegateBase::OnResponseHeadersReceived(
129 response, response_time, status); 129 response, response_time, status);
130 if (data_.data()) { 130 if (data_.data()) {
131 scoped_refptr<StringIOBuffer> buf(new StringIOBuffer(data_.as_string())); 131 scoped_refptr<StringIOBuffer> buf(new StringIOBuffer(data_.as_string()));
132 stream()->SendData(buf, buf->size(), MORE_DATA_TO_SEND); 132 stream()->SendData(buf.get(), buf->size(), MORE_DATA_TO_SEND);
133 } 133 }
134 return status; 134 return status;
135 } 135 }
136 136
137 StreamDelegateWithBody::StreamDelegateWithBody( 137 StreamDelegateWithBody::StreamDelegateWithBody(
138 const base::WeakPtr<SpdyStream>& stream, 138 const base::WeakPtr<SpdyStream>& stream,
139 base::StringPiece data) 139 base::StringPiece data)
140 : StreamDelegateBase(stream), 140 : StreamDelegateBase(stream),
141 buf_(new StringIOBuffer(data.as_string())) {} 141 buf_(new StringIOBuffer(data.as_string())) {}
142 142
143 StreamDelegateWithBody::~StreamDelegateWithBody() { 143 StreamDelegateWithBody::~StreamDelegateWithBody() {
144 } 144 }
145 145
146 void StreamDelegateWithBody::OnRequestHeadersSent() { 146 void StreamDelegateWithBody::OnRequestHeadersSent() {
147 StreamDelegateBase::OnRequestHeadersSent(); 147 StreamDelegateBase::OnRequestHeadersSent();
148 stream()->SendData(buf_.get(), buf_->size(), NO_MORE_DATA_TO_SEND); 148 stream()->SendData(buf_.get(), buf_->size(), NO_MORE_DATA_TO_SEND);
149 } 149 }
150 150
151 } // namespace test 151 } // namespace test
152 152
153 } // namespace net 153 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream_spdy3_unittest.cc ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698