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

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

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
« net/base/net_util.h ('K') | « net/base/net_util.h ('k') | no next file » | 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 #include "net/base/net_util.h" 5 #include "net/base/net_util.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 NetworkInterface::NetworkInterface() 997 NetworkInterface::NetworkInterface()
998 : type(NetworkChangeNotifier::CONNECTION_UNKNOWN), 998 : type(NetworkChangeNotifier::CONNECTION_UNKNOWN),
999 network_prefix(0) { 999 network_prefix(0) {
1000 } 1000 }
1001 1001
1002 NetworkInterface::NetworkInterface(const std::string& name, 1002 NetworkInterface::NetworkInterface(const std::string& name,
1003 const std::string& friendly_name, 1003 const std::string& friendly_name,
1004 uint32 interface_index, 1004 uint32 interface_index,
1005 NetworkChangeNotifier::ConnectionType type, 1005 NetworkChangeNotifier::ConnectionType type,
1006 const IPAddressNumber& address, 1006 const IPAddressNumber& address,
1007 size_t network_prefix) 1007 unsigned int network_prefix)
1008 : name(name), 1008 : name(name),
1009 friendly_name(friendly_name), 1009 friendly_name(friendly_name),
1010 interface_index(interface_index), 1010 interface_index(interface_index),
1011 type(type), 1011 type(type),
1012 address(address), 1012 address(address),
1013 network_prefix(network_prefix) { 1013 network_prefix(network_prefix) {
1014 } 1014 }
1015 1015
1016 NetworkInterface::~NetworkInterface() { 1016 NetworkInterface::~NetworkInterface() {
1017 } 1017 }
(...skipping 14 matching lines...) Expand all
1032 } 1032 }
1033 return a1.size() * CHAR_BIT; 1033 return a1.size() * CHAR_BIT;
1034 } 1034 }
1035 1035
1036 unsigned MaskPrefixLength(const IPAddressNumber& mask) { 1036 unsigned MaskPrefixLength(const IPAddressNumber& mask) {
1037 IPAddressNumber all_ones(mask.size(), 0xFF); 1037 IPAddressNumber all_ones(mask.size(), 0xFF);
1038 return CommonPrefixLength(mask, all_ones); 1038 return CommonPrefixLength(mask, all_ones);
1039 } 1039 }
1040 1040
1041 } // namespace net 1041 } // namespace net
OLDNEW
« net/base/net_util.h ('K') | « net/base/net_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698