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

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

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 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/stunport.h ('k') | webrtc/p2p/base/stunport_unittest.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 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 port_->requests_.SendDelayed( 99 port_->requests_.SendDelayed(
100 new StunBindingRequest(port_, true, server_addr_), 100 new StunBindingRequest(port_, true, server_addr_),
101 RETRY_DELAY); 101 RETRY_DELAY);
102 } 102 }
103 } 103 }
104 104
105 private: 105 private:
106 UDPPort* port_; 106 UDPPort* port_;
107 bool keep_alive_; 107 bool keep_alive_;
108 const rtc::SocketAddress server_addr_; 108 const rtc::SocketAddress server_addr_;
109 uint32 start_time_; 109 uint32_t start_time_;
110 }; 110 };
111 111
112 UDPPort::AddressResolver::AddressResolver( 112 UDPPort::AddressResolver::AddressResolver(
113 rtc::PacketSocketFactory* factory) 113 rtc::PacketSocketFactory* factory)
114 : socket_factory_(factory) {} 114 : socket_factory_(factory) {}
115 115
116 UDPPort::AddressResolver::~AddressResolver() { 116 UDPPort::AddressResolver::~AddressResolver() {
117 for (ResolverMap::iterator it = resolvers_.begin(); 117 for (ResolverMap::iterator it = resolvers_.begin();
118 it != resolvers_.end(); ++it) { 118 it != resolvers_.end(); ++it) {
119 it->second->Destroy(true); 119 it->second->Destroy(true);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 ready_(false), 175 ready_(false),
176 stun_keepalive_delay_(KEEPALIVE_DELAY), 176 stun_keepalive_delay_(KEEPALIVE_DELAY),
177 emit_localhost_for_anyaddress_(emit_localhost_for_anyaddress) { 177 emit_localhost_for_anyaddress_(emit_localhost_for_anyaddress) {
178 requests_.set_origin(origin); 178 requests_.set_origin(origin);
179 } 179 }
180 180
181 UDPPort::UDPPort(rtc::Thread* thread, 181 UDPPort::UDPPort(rtc::Thread* thread,
182 rtc::PacketSocketFactory* factory, 182 rtc::PacketSocketFactory* factory,
183 rtc::Network* network, 183 rtc::Network* network,
184 const rtc::IPAddress& ip, 184 const rtc::IPAddress& ip,
185 uint16 min_port, 185 uint16_t min_port,
186 uint16 max_port, 186 uint16_t max_port,
187 const std::string& username, 187 const std::string& username,
188 const std::string& password, 188 const std::string& password,
189 const std::string& origin, 189 const std::string& origin,
190 bool emit_localhost_for_anyaddress) 190 bool emit_localhost_for_anyaddress)
191 : Port(thread, LOCAL_PORT_TYPE, factory, network, ip, min_port, max_port, 191 : Port(thread,
192 username, password), 192 LOCAL_PORT_TYPE,
193 factory,
194 network,
195 ip,
196 min_port,
197 max_port,
198 username,
199 password),
193 requests_(thread), 200 requests_(thread),
194 socket_(NULL), 201 socket_(NULL),
195 error_(0), 202 error_(0),
196 ready_(false), 203 ready_(false),
197 stun_keepalive_delay_(KEEPALIVE_DELAY), 204 stun_keepalive_delay_(KEEPALIVE_DELAY),
198 emit_localhost_for_anyaddress_(emit_localhost_for_anyaddress) { 205 emit_localhost_for_anyaddress_(emit_localhost_for_anyaddress) {
199 requests_.set_origin(origin); 206 requests_.set_origin(origin);
200 } 207 }
201 208
202 bool UDPPort::Init() { 209 bool UDPPort::Init() {
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 const std::vector<Candidate>& existing_candidates = Candidates(); 470 const std::vector<Candidate>& existing_candidates = Candidates();
464 std::vector<Candidate>::const_iterator it = existing_candidates.begin(); 471 std::vector<Candidate>::const_iterator it = existing_candidates.begin();
465 for (; it != existing_candidates.end(); ++it) { 472 for (; it != existing_candidates.end(); ++it) {
466 if (it->address() == addr) 473 if (it->address() == addr)
467 return true; 474 return true;
468 } 475 }
469 return false; 476 return false;
470 } 477 }
471 478
472 } // namespace cricket 479 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/stunport.h ('k') | webrtc/p2p/base/stunport_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698