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

Side by Side Diff: jingle/glue/proxy_resolving_client_socket.cc

Issue 332313003: Add Finch experiment for selectively bypassing proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2-line change: Add missing ifdef(SPDY_PROXY_AUTH_ORIGIN); previously only compiled on android, but … Created 6 years, 5 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 (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 "jingle/glue/proxy_resolving_client_socket.h" 5 #include "jingle/glue/proxy_resolving_client_socket.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 int ProxyResolvingClientSocket::Connect( 131 int ProxyResolvingClientSocket::Connect(
132 const net::CompletionCallback& callback) { 132 const net::CompletionCallback& callback) {
133 DCHECK(user_connect_callback_.is_null()); 133 DCHECK(user_connect_callback_.is_null());
134 134
135 tried_direct_connect_fallback_ = false; 135 tried_direct_connect_fallback_ = false;
136 136
137 // First we try and resolve the proxy. 137 // First we try and resolve the proxy.
138 int status = network_session_->proxy_service()->ResolveProxy( 138 int status = network_session_->proxy_service()->ResolveProxy(
139 proxy_url_, 139 proxy_url_,
140 0,
140 &proxy_info_, 141 &proxy_info_,
141 proxy_resolve_callback_, 142 proxy_resolve_callback_,
142 &pac_request_, 143 &pac_request_,
144 NULL,
143 bound_net_log_); 145 bound_net_log_);
144 if (status != net::ERR_IO_PENDING) { 146 if (status != net::ERR_IO_PENDING) {
145 // We defer execution of ProcessProxyResolveDone instead of calling it 147 // We defer execution of ProcessProxyResolveDone instead of calling it
146 // directly here for simplicity. From the caller's point of view, 148 // directly here for simplicity. From the caller's point of view,
147 // the connect always happens asynchronously. 149 // the connect always happens asynchronously.
148 base::MessageLoop* message_loop = base::MessageLoop::current(); 150 base::MessageLoop* message_loop = base::MessageLoop::current();
149 CHECK(message_loop); 151 CHECK(message_loop);
150 message_loop->PostTask( 152 message_loop->PostTask(
151 FROM_HERE, 153 FROM_HERE,
152 base::Bind(&ProxyResolvingClientSocket::ProcessProxyResolveDone, 154 base::Bind(&ProxyResolvingClientSocket::ProcessProxyResolveDone,
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 return false; 398 return false;
397 } 399 }
398 400
399 void ProxyResolvingClientSocket::CloseTransportSocket() { 401 void ProxyResolvingClientSocket::CloseTransportSocket() {
400 if (transport_.get() && transport_->socket()) 402 if (transport_.get() && transport_->socket())
401 transport_->socket()->Disconnect(); 403 transport_->socket()->Disconnect();
402 transport_.reset(); 404 transport_.reset();
403 } 405 }
404 406
405 } // namespace jingle_glue 407 } // namespace jingle_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698