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

Side by Side Diff: webrtc/p2p/base/relayport.cc

Issue 2731673002: Removing HTTPS and SOCKS proxy server code. (Closed)
Patch Set: Adding back something still referenced by chromium. Created 3 years, 9 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 | « webrtc/p2p/base/portallocator.h ('k') | webrtc/p2p/client/basicportallocator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include <algorithm> 10 #include <algorithm>
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // TODO: set local preference value for TCP based candidates. 203 // TODO: set local preference value for TCP based candidates.
204 } 204 }
205 205
206 RelayPort::~RelayPort() { 206 RelayPort::~RelayPort() {
207 for (size_t i = 0; i < entries_.size(); ++i) 207 for (size_t i = 0; i < entries_.size(); ++i)
208 delete entries_[i]; 208 delete entries_[i];
209 thread()->Clear(this); 209 thread()->Clear(this);
210 } 210 }
211 211
212 void RelayPort::AddServerAddress(const ProtocolAddress& addr) { 212 void RelayPort::AddServerAddress(const ProtocolAddress& addr) {
213 // Since HTTP proxies usually only allow 443, 213 server_addr_.push_back(addr);
214 // let's up the priority on PROTO_SSLTCP
215 if (addr.proto == PROTO_SSLTCP &&
216 (proxy().type == rtc::PROXY_HTTPS ||
217 proxy().type == rtc::PROXY_UNKNOWN)) {
218 server_addr_.push_front(addr);
219 } else {
220 server_addr_.push_back(addr);
221 }
222 } 214 }
223 215
224 void RelayPort::AddExternalAddress(const ProtocolAddress& addr) { 216 void RelayPort::AddExternalAddress(const ProtocolAddress& addr) {
225 std::string proto_name = ProtoToString(addr.proto); 217 std::string proto_name = ProtoToString(addr.proto);
226 for (std::vector<ProtocolAddress>::iterator it = external_addr_.begin(); 218 for (std::vector<ProtocolAddress>::iterator it = external_addr_.begin();
227 it != external_addr_.end(); ++it) { 219 it != external_addr_.end(); ++it) {
228 if ((it->address == addr.address) && (it->proto == addr.proto)) { 220 if ((it->address == addr.address) && (it->proto == addr.proto)) {
229 LOG(INFO) << "Redundant relay address: " << proto_name 221 LOG(INFO) << "Redundant relay address: " << proto_name
230 << " @ " << addr.address.ToSensitiveString(); 222 << " @ " << addr.address.ToSensitiveString();
231 return; 223 return;
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 if (rtc::TimeMillis() - start_time_ <= kRetryTimeout) 831 if (rtc::TimeMillis() - start_time_ <= kRetryTimeout)
840 entry_->ScheduleKeepAlive(); 832 entry_->ScheduleKeepAlive();
841 } 833 }
842 834
843 void AllocateRequest::OnTimeout() { 835 void AllocateRequest::OnTimeout() {
844 LOG(INFO) << "Allocate request timed out"; 836 LOG(INFO) << "Allocate request timed out";
845 entry_->HandleConnectFailure(connection_->socket()); 837 entry_->HandleConnectFailure(connection_->socket());
846 } 838 }
847 839
848 } // namespace cricket 840 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/portallocator.h ('k') | webrtc/p2p/client/basicportallocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698