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

Side by Side Diff: net/websockets/websocket_test_util.cc

Issue 1157403005: Subsituting pattern ScopedVector push_back.(ptr.release()) with push_back(ptr.Pass()) in net/websoc… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « net/websockets/websocket_stream_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/websockets/websocket_test_util.h" 5 #include "net/websockets/websocket_test_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 &detail_->write, 130 &detail_->write,
131 1)); 131 1));
132 socket_data->set_connect_data(MockConnect(SYNCHRONOUS, OK)); 132 socket_data->set_connect_data(MockConnect(SYNCHRONOUS, OK));
133 socket_data->SetStop(sequence); 133 socket_data->SetStop(sequence);
134 AddRawExpectations(socket_data.Pass()); 134 AddRawExpectations(socket_data.Pass());
135 } 135 }
136 136
137 void WebSocketDeterministicMockClientSocketFactoryMaker::AddRawExpectations( 137 void WebSocketDeterministicMockClientSocketFactoryMaker::AddRawExpectations(
138 scoped_ptr<DeterministicSocketData> socket_data) { 138 scoped_ptr<DeterministicSocketData> socket_data) {
139 detail_->factory.AddSocketDataProvider(socket_data.get()); 139 detail_->factory.AddSocketDataProvider(socket_data.get());
140 detail_->socket_data_vector.push_back(socket_data.release()); 140 detail_->socket_data_vector.push_back(socket_data.Pass());
141 } 141 }
142 142
143 void 143 void
144 WebSocketDeterministicMockClientSocketFactoryMaker::AddSSLSocketDataProvider( 144 WebSocketDeterministicMockClientSocketFactoryMaker::AddSSLSocketDataProvider(
145 scoped_ptr<SSLSocketDataProvider> ssl_socket_data) { 145 scoped_ptr<SSLSocketDataProvider> ssl_socket_data) {
146 detail_->factory.AddSSLSocketDataProvider(ssl_socket_data.get()); 146 detail_->factory.AddSSLSocketDataProvider(ssl_socket_data.get());
147 detail_->ssl_socket_data_vector.push_back(ssl_socket_data.release()); 147 detail_->ssl_socket_data_vector.push_back(ssl_socket_data.Pass());
148 } 148 }
149 149
150 WebSocketTestURLRequestContextHost::WebSocketTestURLRequestContextHost() 150 WebSocketTestURLRequestContextHost::WebSocketTestURLRequestContextHost()
151 : url_request_context_(true), url_request_context_initialized_(false) { 151 : url_request_context_(true), url_request_context_initialized_(false) {
152 url_request_context_.set_client_socket_factory(maker_.factory()); 152 url_request_context_.set_client_socket_factory(maker_.factory());
153 } 153 }
154 154
155 WebSocketTestURLRequestContextHost::~WebSocketTestURLRequestContextHost() {} 155 WebSocketTestURLRequestContextHost::~WebSocketTestURLRequestContextHost() {}
156 156
157 void WebSocketTestURLRequestContextHost::AddRawExpectations( 157 void WebSocketTestURLRequestContextHost::AddRawExpectations(
(...skipping 18 matching lines...) Expand all
176 if (!url_request_context_initialized_) { 176 if (!url_request_context_initialized_) {
177 url_request_context_.Init(); 177 url_request_context_.Init();
178 // A Network Delegate is required to make the URLRequest::Delegate work. 178 // A Network Delegate is required to make the URLRequest::Delegate work.
179 url_request_context_.set_network_delegate(&network_delegate_); 179 url_request_context_.set_network_delegate(&network_delegate_);
180 url_request_context_initialized_ = true; 180 url_request_context_initialized_ = true;
181 } 181 }
182 return &url_request_context_; 182 return &url_request_context_;
183 } 183 }
184 184
185 } // namespace net 185 } // namespace net
OLDNEW
« no previous file with comments | « net/websockets/websocket_stream_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698