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

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

Issue 691783003: [WIP NOT FOR COMMIT] Switch Android to libc++ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove more unused stuff Created 5 years, 11 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 | « build/config/compiler/BUILD.gn ('k') | net/spdy/spdy_prefixed_buffer_reader_test.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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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_linux.h" 5 #include "net/base/net_util_linux.h"
6 6
7 #include <net/if.h> 7 #include <net/if.h>
8 #include <netinet/in.h> 8 #include <netinet/in.h>
9 #include <set> 9 #include <set>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 return true; 57 return true;
58 } 58 }
59 59
60 } // namespace 60 } // namespace
61 61
62 namespace internal { 62 namespace internal {
63 63
64 inline const unsigned char* GetIPAddressData(const IPAddressNumber& ip) { 64 inline const unsigned char* GetIPAddressData(const IPAddressNumber& ip) {
65 #if defined(OS_ANDROID)
66 return ip.begin();
67 #else
68 return ip.data(); 65 return ip.data();
69 #endif
70 } 66 }
71 67
72 bool GetNetworkListImpl( 68 bool GetNetworkListImpl(
73 NetworkInterfaceList* networks, 69 NetworkInterfaceList* networks,
74 int policy, 70 int policy,
75 const base::hash_set<int>& online_links, 71 const base::hash_set<int>& online_links,
76 const internal::AddressTrackerLinux::AddressMap& address_map, 72 const internal::AddressTrackerLinux::AddressMap& address_map,
77 GetInterfaceNameFunction get_interface_name) { 73 GetInterfaceNameFunction get_interface_name) {
78 std::map<int, std::string> ifnames; 74 std::map<int, std::string> ifnames;
79 75
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 141
146 internal::AddressTrackerLinux tracker; 142 internal::AddressTrackerLinux tracker;
147 tracker.Init(); 143 tracker.Init();
148 144
149 return internal::GetNetworkListImpl(networks, policy, 145 return internal::GetNetworkListImpl(networks, policy,
150 tracker.GetOnlineLinks(), 146 tracker.GetOnlineLinks(),
151 tracker.GetAddressMap(), &if_indextoname); 147 tracker.GetAddressMap(), &if_indextoname);
152 } 148 }
153 149
154 } // namespace net 150 } // namespace net
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | net/spdy/spdy_prefixed_buffer_reader_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698