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

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

Issue 2235973002: Add a SetDoNotFragment() method to DatagramSocket, and call this for (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Blimp Created 4 years, 4 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 <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 return net::ERR_SOCKET_NOT_CONNECTED; 126 return net::ERR_SOCKET_NOT_CONNECTED;
127 } 127 }
128 128
129 int ProxyResolvingClientSocket::SetSendBufferSize(int32_t size) { 129 int ProxyResolvingClientSocket::SetSendBufferSize(int32_t size) {
130 if (transport_.get() && transport_->socket()) 130 if (transport_.get() && transport_->socket())
131 return transport_->socket()->SetSendBufferSize(size); 131 return transport_->socket()->SetSendBufferSize(size);
132 NOTREACHED(); 132 NOTREACHED();
133 return net::ERR_SOCKET_NOT_CONNECTED; 133 return net::ERR_SOCKET_NOT_CONNECTED;
134 } 134 }
135 135
136 int ProxyResolvingClientSocket::SetDoNotFragment(bool do_not_fragment) {
137 if (transport_.get() && transport_->socket())
138 return transport_->socket()->SetSendBufferSize(do_not_fragment);
139 NOTREACHED();
140 return net::ERR_SOCKET_NOT_CONNECTED;
141 }
142
136 int ProxyResolvingClientSocket::Connect( 143 int ProxyResolvingClientSocket::Connect(
137 const net::CompletionCallback& callback) { 144 const net::CompletionCallback& callback) {
138 DCHECK(user_connect_callback_.is_null()); 145 DCHECK(user_connect_callback_.is_null());
139 146
140 tried_direct_connect_fallback_ = false; 147 tried_direct_connect_fallback_ = false;
141 148
142 // First we try and resolve the proxy. 149 // First we try and resolve the proxy.
143 int status = network_session_->proxy_service()->ResolveProxy( 150 int status = network_session_->proxy_service()->ResolveProxy(
144 proxy_url_, 151 proxy_url_,
145 std::string(), 152 std::string(),
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 return 0; 430 return 0;
424 } 431 }
425 432
426 void ProxyResolvingClientSocket::CloseTransportSocket() { 433 void ProxyResolvingClientSocket::CloseTransportSocket() {
427 if (transport_.get() && transport_->socket()) 434 if (transport_.get() && transport_->socket())
428 transport_->socket()->Disconnect(); 435 transport_->socket()->Disconnect();
429 transport_.reset(); 436 transport_.reset();
430 } 437 }
431 438
432 } // namespace jingle_glue 439 } // namespace jingle_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698