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

Side by Side Diff: net/base/net_util.h

Issue 536133003: MergeNetworkList can't group address under the same interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change prefix from size_t to unsigned int per @wfh's feedback comment Created 6 years, 3 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 | « content/renderer/p2p/socket_dispatcher.h ('k') | net/base/net_util.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 // 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 #ifndef NET_BASE_NET_UTIL_H_ 5 #ifndef NET_BASE_NET_UTIL_H_
6 #define NET_BASE_NET_UTIL_H_ 6 #define NET_BASE_NET_UTIL_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 440
441 // struct that is used by GetNetworkList() to represent a network 441 // struct that is used by GetNetworkList() to represent a network
442 // interface. 442 // interface.
443 struct NET_EXPORT NetworkInterface { 443 struct NET_EXPORT NetworkInterface {
444 NetworkInterface(); 444 NetworkInterface();
445 NetworkInterface(const std::string& name, 445 NetworkInterface(const std::string& name,
446 const std::string& friendly_name, 446 const std::string& friendly_name,
447 uint32 interface_index, 447 uint32 interface_index,
448 NetworkChangeNotifier::ConnectionType type, 448 NetworkChangeNotifier::ConnectionType type,
449 const IPAddressNumber& address, 449 const IPAddressNumber& address,
450 size_t network_prefix); 450 unsigned int network_prefix);
451 ~NetworkInterface(); 451 ~NetworkInterface();
452 452
453 std::string name; 453 std::string name;
454 std::string friendly_name; // Same as |name| on non-Windows. 454 std::string friendly_name; // Same as |name| on non-Windows.
455 uint32 interface_index; // Always 0 on Android. 455 uint32 interface_index; // Always 0 on Android.
456 NetworkChangeNotifier::ConnectionType type; 456 NetworkChangeNotifier::ConnectionType type;
457 IPAddressNumber address; 457 IPAddressNumber address;
458 size_t network_prefix; 458 unsigned int network_prefix;
Will Harris 2014/09/13 00:09:10 nit: could use uint32 like interface_index
davidben 2014/09/15 17:27:43 +1. If the goal is to avoid implicitly sized types
guoweis2 2014/09/15 18:10:10 Done.
459 }; 459 };
460 460
461 typedef std::vector<NetworkInterface> NetworkInterfaceList; 461 typedef std::vector<NetworkInterface> NetworkInterfaceList;
462 462
463 // Policy settings to include/exclude network interfaces. 463 // Policy settings to include/exclude network interfaces.
464 enum HostAddressSelectionPolicy { 464 enum HostAddressSelectionPolicy {
465 INCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES = 0x0, 465 INCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES = 0x0,
466 EXCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES = 0x1, 466 EXCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES = 0x1,
467 // Include temp address only when interface has both permanent and 467 // Include temp address only when interface has both permanent and
468 // temp addresses. 468 // temp addresses.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 DSCP_CS5 = 40, // Video 531 DSCP_CS5 = 40, // Video
532 DSCP_EF = 46, // Voice 532 DSCP_EF = 46, // Voice
533 DSCP_CS6 = 48, // Voice 533 DSCP_CS6 = 48, // Voice
534 DSCP_CS7 = 56, // Control messages 534 DSCP_CS7 = 56, // Control messages
535 DSCP_LAST = DSCP_CS7 535 DSCP_LAST = DSCP_CS7
536 }; 536 };
537 537
538 } // namespace net 538 } // namespace net
539 539
540 #endif // NET_BASE_NET_UTIL_H_ 540 #endif // NET_BASE_NET_UTIL_H_
OLDNEW
« no previous file with comments | « content/renderer/p2p/socket_dispatcher.h ('k') | net/base/net_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698