| OLD | NEW |
| 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/address_tracker_linux.h" | 5 #include "net/base/address_tracker_linux.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 | 8 |
| 9 #include "base/eintr_wrapper.h" | |
| 10 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/posix/eintr_wrapper.h" |
| 11 #include "net/base/network_change_notifier_linux.h" | 11 #include "net/base/network_change_notifier_linux.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 namespace internal { | 14 namespace internal { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 // Retrieves address from NETLINK address message. | 18 // Retrieves address from NETLINK address message. |
| 19 bool GetAddress(const struct nlmsghdr* header, IPAddressNumber* out) { | 19 bool GetAddress(const struct nlmsghdr* header, IPAddressNumber* out) { |
| 20 const struct ifaddrmsg* msg = | 20 const struct ifaddrmsg* msg = |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 void AddressTrackerLinux::OnFileCanReadWithoutBlocking(int fd) { | 220 void AddressTrackerLinux::OnFileCanReadWithoutBlocking(int fd) { |
| 221 DCHECK_EQ(netlink_fd_, fd); | 221 DCHECK_EQ(netlink_fd_, fd); |
| 222 if (ReadMessages()) | 222 if (ReadMessages()) |
| 223 callback_.Run(); | 223 callback_.Run(); |
| 224 } | 224 } |
| 225 | 225 |
| 226 void AddressTrackerLinux::OnFileCanWriteWithoutBlocking(int /* fd */) {} | 226 void AddressTrackerLinux::OnFileCanWriteWithoutBlocking(int /* fd */) {} |
| 227 | 227 |
| 228 } // namespace internal | 228 } // namespace internal |
| 229 } // namespace net | 229 } // namespace net |
| OLD | NEW |