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

Unified Diff: net/websockets/websocket_test_util.cc

Issue 902553002: Change error message for WebSocket tunnel failure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix memory leak and simplify SetProxyService() Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/websockets/websocket_test_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_test_util.cc
diff --git a/net/websockets/websocket_test_util.cc b/net/websockets/websocket_test_util.cc
index 6091c9e0be16a1a95d48e2c7cb7ba5f37b41eda7..0b0b8c04a248787790c106288b012cfb4dc6809d 100644
--- a/net/websockets/websocket_test_util.cc
+++ b/net/websockets/websocket_test_util.cc
@@ -11,6 +11,7 @@
#include "base/memory/scoped_vector.h"
#include "base/stl_util.h"
#include "base/strings/stringprintf.h"
+#include "net/proxy/proxy_service.h"
#include "net/socket/socket_test_util.h"
namespace net {
@@ -151,6 +152,13 @@ void WebSocketTestURLRequestContextHost::AddSSLSocketDataProvider(
maker_.AddSSLSocketDataProvider(ssl_socket_data.Pass());
}
+void WebSocketTestURLRequestContextHost::SetProxyConfig(
+ const std::string& proxy_rules) {
+ DCHECK(!url_request_context_initialized_);
+ proxy_service_.reset(ProxyService::CreateFixed(proxy_rules));
+ url_request_context_.set_proxy_service(proxy_service_.get());
+}
+
TestURLRequestContext*
WebSocketTestURLRequestContextHost::GetURLRequestContext() {
if (!url_request_context_initialized_) {
« no previous file with comments | « net/websockets/websocket_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698