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

Side by Side Diff: webrtc/p2p/base/port.h

Issue 1976683003: Update the type and cost of existing networks if its type is found later by network monitor (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Minor changes Created 4 years, 7 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/candidate.h ('k') | webrtc/p2p/base/port.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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 candidate_filter_ = candidate_filter; 297 candidate_filter_ = candidate_filter;
298 } 298 }
299 int16_t network_cost() const { return network_cost_; } 299 int16_t network_cost() const { return network_cost_; }
300 300
301 protected: 301 protected:
302 enum { 302 enum {
303 MSG_DEAD = 0, 303 MSG_DEAD = 0,
304 MSG_FIRST_AVAILABLE 304 MSG_FIRST_AVAILABLE
305 }; 305 };
306 306
307 virtual void UpdateNetworkCost();
308
307 void set_type(const std::string& type) { type_ = type; } 309 void set_type(const std::string& type) { type_ = type; }
308 310
309 void AddAddress(const rtc::SocketAddress& address, 311 void AddAddress(const rtc::SocketAddress& address,
310 const rtc::SocketAddress& base_address, 312 const rtc::SocketAddress& base_address,
311 const rtc::SocketAddress& related_address, 313 const rtc::SocketAddress& related_address,
312 const std::string& protocol, 314 const std::string& protocol,
313 const std::string& relay_protocol, 315 const std::string& relay_protocol,
314 const std::string& tcptype, 316 const std::string& tcptype,
315 const std::string& type, 317 const std::string& type,
316 uint32_t type_preference, 318 uint32_t type_preference,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 void OnConnectionDestroyed(Connection* conn); 357 void OnConnectionDestroyed(Connection* conn);
356 358
357 // Whether this port is dead, and hence, should be destroyed on the controlled 359 // Whether this port is dead, and hence, should be destroyed on the controlled
358 // side. 360 // side.
359 bool dead() const { 361 bool dead() const {
360 return ice_role_ == ICEROLE_CONTROLLED && connections_.empty(); 362 return ice_role_ == ICEROLE_CONTROLLED && connections_.empty();
361 } 363 }
362 364
363 void OnNetworkInactive(const rtc::Network* network); 365 void OnNetworkInactive(const rtc::Network* network);
364 366
367 void OnNetworkTypeChanged(const rtc::Network* network);
368
365 rtc::Thread* thread_; 369 rtc::Thread* thread_;
366 rtc::PacketSocketFactory* factory_; 370 rtc::PacketSocketFactory* factory_;
367 std::string type_; 371 std::string type_;
368 bool send_retransmit_count_attribute_; 372 bool send_retransmit_count_attribute_;
369 rtc::Network* network_; 373 rtc::Network* network_;
370 rtc::IPAddress ip_; 374 rtc::IPAddress ip_;
371 uint16_t min_port_; 375 uint16_t min_port_;
372 uint16_t max_port_; 376 uint16_t max_port_;
373 std::string content_name_; 377 std::string content_name_;
374 int component_; 378 int component_;
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 const rtc::PacketOptions& options) override; 674 const rtc::PacketOptions& options) override;
671 int GetError() override { return error_; } 675 int GetError() override { return error_; }
672 676
673 private: 677 private:
674 int error_ = 0; 678 int error_ = 0;
675 }; 679 };
676 680
677 } // namespace cricket 681 } // namespace cricket
678 682
679 #endif // WEBRTC_P2P_BASE_PORT_H_ 683 #endif // WEBRTC_P2P_BASE_PORT_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/candidate.h ('k') | webrtc/p2p/base/port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698