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

Side by Side Diff: webrtc/base/network.h

Issue 1837823005: GetDefaultLocalAddress should return the bestIP (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Rebase to the master Created 4 years, 8 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 | « no previous file | webrtc/base/network.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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 void set_enumeration_permission(EnumerationPermission state) { 153 void set_enumeration_permission(EnumerationPermission state) {
154 enumeration_permission_ = state; 154 enumeration_permission_ = state;
155 } 155 }
156 156
157 void set_default_local_addresses(const IPAddress& ipv4, 157 void set_default_local_addresses(const IPAddress& ipv4,
158 const IPAddress& ipv6); 158 const IPAddress& ipv6);
159 159
160 private: 160 private:
161 friend class NetworkTest; 161 friend class NetworkTest;
162 162
163 Network* GetNetworkFromAddress(const rtc::IPAddress& ip) const;
164
163 EnumerationPermission enumeration_permission_; 165 EnumerationPermission enumeration_permission_;
164 166
165 NetworkList networks_; 167 NetworkList networks_;
166 int max_ipv6_networks_; 168 int max_ipv6_networks_;
167 169
168 NetworkMap networks_map_; 170 NetworkMap networks_map_;
169 bool ipv6_enabled_; 171 bool ipv6_enabled_;
170 172
171 rtc::scoped_ptr<rtc::Network> ipv4_any_address_network_; 173 rtc::scoped_ptr<rtc::Network> ipv4_any_address_network_;
172 rtc::scoped_ptr<rtc::Network> ipv6_any_address_network_; 174 rtc::scoped_ptr<rtc::Network> ipv6_any_address_network_;
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 int preference_; 385 int preference_;
384 bool active_ = true; 386 bool active_ = true;
385 uint16_t id_ = 0; 387 uint16_t id_ = 0;
386 388
387 friend class NetworkManager; 389 friend class NetworkManager;
388 }; 390 };
389 391
390 } // namespace rtc 392 } // namespace rtc
391 393
392 #endif // WEBRTC_BASE_NETWORK_H_ 394 #endif // WEBRTC_BASE_NETWORK_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/base/network.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698