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

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

Issue 1290243007: Shift URLRequestContextStorage over to taking scoped_ptrs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Paul_BuilderGrab
Patch Set: Sync'd to revision p349162. Created 5 years, 3 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
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 158
159 void WebSocketTestURLRequestContextHost::AddSSLSocketDataProvider( 159 void WebSocketTestURLRequestContextHost::AddSSLSocketDataProvider(
160 scoped_ptr<SSLSocketDataProvider> ssl_socket_data) { 160 scoped_ptr<SSLSocketDataProvider> ssl_socket_data) {
161 maker_.AddSSLSocketDataProvider(ssl_socket_data.Pass()); 161 maker_.AddSSLSocketDataProvider(ssl_socket_data.Pass());
162 } 162 }
163 163
164 void WebSocketTestURLRequestContextHost::SetProxyConfig( 164 void WebSocketTestURLRequestContextHost::SetProxyConfig(
165 const std::string& proxy_rules) { 165 const std::string& proxy_rules) {
166 DCHECK(!url_request_context_initialized_); 166 DCHECK(!url_request_context_initialized_);
167 proxy_service_.reset(ProxyService::CreateFixed(proxy_rules)); 167 proxy_service_ = ProxyService::CreateFixed(proxy_rules);
168 url_request_context_.set_proxy_service(proxy_service_.get()); 168 url_request_context_.set_proxy_service(proxy_service_.get());
169 } 169 }
170 170
171 TestURLRequestContext* 171 TestURLRequestContext*
172 WebSocketTestURLRequestContextHost::GetURLRequestContext() { 172 WebSocketTestURLRequestContextHost::GetURLRequestContext() {
173 if (!url_request_context_initialized_) { 173 if (!url_request_context_initialized_) {
174 url_request_context_.Init(); 174 url_request_context_.Init();
175 // A Network Delegate is required to make the URLRequest::Delegate work. 175 // A Network Delegate is required to make the URLRequest::Delegate work.
176 url_request_context_.set_network_delegate(&network_delegate_); 176 url_request_context_.set_network_delegate(&network_delegate_);
177 url_request_context_initialized_ = true; 177 url_request_context_initialized_ = true;
178 } 178 }
179 return &url_request_context_; 179 return &url_request_context_;
180 } 180 }
181 181
182 } // namespace net 182 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_test_util.cc ('k') | remoting/host/token_validator_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698