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

Issue 739983005: Determine connection type in NetworkChangeNotifierLinux. (Closed)

Created:
6 years, 1 month ago by derekjchow1
Modified:
5 years, 10 months ago
Reviewers:
pauljensen
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Determine connection type in NetworkChangeNotifierLinux. Check interface for wireless extensions to determine if it is a wifi connection. Check SIOCETHTOOL for ethernet. GetCurrentConnectionType will return the CONNECTION_UNKNOWN unless all connections are the same type. R=pauljensen@chromium.org BUG=160537 Committed: https://crrev.com/5482d5e52c66f72082ee243464d0e109b66419a9 Cr-Commit-Position: refs/heads/master@{#314042}

Patch Set 1 #

Total comments: 22

Patch Set 2 : Address comments from patch set 1 #

Patch Set 3 : Return CONNECTION_WIFI if all connection types are wifi #

Total comments: 30

Patch Set 4 : Address comments from patch set 3 #

Total comments: 24

Patch Set 5 : Address comments from patch set 4 #

Total comments: 4

Patch Set 6 : Address comments from patch set 5 #

Total comments: 10

Patch Set 7 : Remove unnessecary headers #

Total comments: 4

Patch Set 8 : Test ethtool for CONNECTION_ETHERNET #

Total comments: 10

Patch Set 9 : Suppress tunnel interfaces. Use ScopedFD. #

Total comments: 16

Patch Set 10 : Address comments in patchset 9 #

Total comments: 2

Patch Set 11 : Re-add write to ifnames #

Total comments: 3

Patch Set 12 : Fix nit, don't use designated initializers #

Patch Set 13 : Android build fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+236 lines, -89 lines) Patch
M net/base/address_tracker_linux.h View 1 2 3 4 5 6 7 8 4 chunks +19 lines, -8 lines 0 comments Download
M net/base/address_tracker_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 11 chunks +73 lines, -53 lines 0 comments Download
M net/base/address_tracker_linux_unittest.cc View 1 2 3 4 2 chunks +7 lines, -5 lines 0 comments Download
M net/base/net_util_linux.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
M net/base/net_util_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +48 lines, -13 lines 0 comments Download
M net/base/net_util_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M net/base/network_change_notifier.h View 1 2 3 4 3 chunks +11 lines, -0 lines 0 comments Download
M net/base/network_change_notifier.cc View 1 2 3 4 5 1 chunk +21 lines, -0 lines 0 comments Download
M net/base/network_change_notifier_linux.cc View 1 2 3 chunks +23 lines, -5 lines 0 comments Download
M net/base/network_change_notifier_unittest.cc View 1 2 3 4 2 chunks +30 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (3 generated)
derekjchow1
6 years, 1 month ago (2014-11-21 18:08:49 UTC) #1
pauljensen
not lgtm https://codereview.chromium.org/739983005/diff/1/net/base/address_tracker_linux.cc File net/base/address_tracker_linux.cc (right): https://codereview.chromium.org/739983005/diff/1/net/base/address_tracker_linux.cc#newcode43 net/base/address_tracker_linux.cc:43: } extra line break https://codereview.chromium.org/739983005/diff/1/net/base/address_tracker_linux.cc#newcode45 net/base/address_tracker_linux.cc:45: type ...
6 years, 1 month ago (2014-11-21 18:55:36 UTC) #2
derekjchow1
Thanks for the feedback Paul. PTAL. I would also appreciate if you could clarify how ...
6 years, 1 month ago (2014-11-21 23:13:59 UTC) #3
pauljensen
https://codereview.chromium.org/739983005/diff/1/net/base/address_tracker_linux.cc File net/base/address_tracker_linux.cc (right): https://codereview.chromium.org/739983005/diff/1/net/base/address_tracker_linux.cc#newcode45 net/base/address_tracker_linux.cc:45: type = NetworkChangeNotifier::CONNECTION_ETHERNET; On 2014/11/21 23:13:58, derekjchow1 wrote: > ...
6 years ago (2014-11-24 12:33:18 UTC) #4
derekjchow1
Hi Paul, how do the following changes sound? 1) Modify AddressTrackerLinux to monitor changes to ...
6 years ago (2014-12-01 18:58:34 UTC) #5
pauljensen
On 2014/12/01 18:58:34, derekjchow1 wrote: > Hi Paul, how do the following changes sound? > ...
6 years ago (2014-12-01 19:33:13 UTC) #6
derekjchow1
> What is your motivation for trying to fix this issue? Is there a particular ...
6 years ago (2014-12-01 22:24:37 UTC) #7
pauljensen
On 2014/12/01 22:24:37, derekjchow1 wrote: > > What is your motivation for trying to fix ...
6 years ago (2014-12-02 17:21:03 UTC) #8
derekjchow1
> What about limiting it to interfaces with IP addresses? Can you post the "ip ...
6 years ago (2014-12-02 19:02:03 UTC) #9
derekjchow1
Sorry for the long delay Paul, I have yet to find generic linux solutions for ...
5 years, 11 months ago (2015-01-07 18:39:37 UTC) #10
pauljensen
https://codereview.chromium.org/739983005/diff/40001/net/base/address_tracker_linux.cc File net/base/address_tracker_linux.cc (right): https://codereview.chromium.org/739983005/diff/40001/net/base/address_tracker_linux.cc#newcode18 net/base/address_tracker_linux.cc:18: #include <arpa/inet.h> Shouldn't system headers go above Chromium header ...
5 years, 11 months ago (2015-01-13 13:14:31 UTC) #11
derekjchow1
https://codereview.chromium.org/739983005/diff/40001/net/base/address_tracker_linux.cc File net/base/address_tracker_linux.cc (right): https://codereview.chromium.org/739983005/diff/40001/net/base/address_tracker_linux.cc#newcode18 net/base/address_tracker_linux.cc:18: #include <arpa/inet.h> On 2015/01/13 13:14:29, pauljensen wrote: > Shouldn't ...
5 years, 11 months ago (2015-01-13 21:32:39 UTC) #12
pauljensen
Please run some trybots on the change. https://codereview.chromium.org/739983005/diff/60001/net/base/address_tracker_linux.cc File net/base/address_tracker_linux.cc (right): https://codereview.chromium.org/739983005/diff/60001/net/base/address_tracker_linux.cc#newcode16 net/base/address_tracker_linux.cc:16: #include "net/base/net_util_linux.h" ...
5 years, 11 months ago (2015-01-15 15:05:11 UTC) #13
derekjchow1
I'm a fairly new Chromium developer, so I don't have try-bot access yet (just sent ...
5 years, 11 months ago (2015-01-15 20:32:51 UTC) #14
derekjchow1
Ping? I ran a few trybots all but one seem successful (linux_chromium_trusty32_rel is failing with ...
5 years, 11 months ago (2015-01-26 18:04:15 UTC) #15
pauljensen
Sorry, I got pulled onto other things and have been sheriffing the last two days. ...
5 years, 11 months ago (2015-01-26 18:09:35 UTC) #16
derekjchow1
https://codereview.chromium.org/739983005/diff/80001/net/base/address_tracker_linux.h File net/base/address_tracker_linux.h (right): https://codereview.chromium.org/739983005/diff/80001/net/base/address_tracker_linux.h#newcode70 net/base/address_tracker_linux.h:70: // pointer On 2015/01/26 18:09:35, pauljensen wrote: > why ...
5 years, 11 months ago (2015-01-27 01:18:04 UTC) #17
pauljensen
Can you adjust this piece of the description: "Assume ethernet otherwise." What does "Also adds ...
5 years, 11 months ago (2015-01-27 20:25:17 UTC) #18
derekjchow1
Description updated. https://codereview.chromium.org/739983005/diff/100001/net/base/address_tracker_linux.cc File net/base/address_tracker_linux.cc (right): https://codereview.chromium.org/739983005/diff/100001/net/base/address_tracker_linux.cc#newcode16 net/base/address_tracker_linux.cc:16: #include "net/base/net_util_linux.h" On 2015/01/27 20:25:17, pauljensen wrote: ...
5 years, 11 months ago (2015-01-27 21:50:32 UTC) #19
pauljensen
https://codereview.chromium.org/739983005/diff/120001/net/base/net_util_linux.cc File net/base/net_util_linux.cc (right): https://codereview.chromium.org/739983005/diff/120001/net/base/net_util_linux.cc#newcode90 net/base/net_util_linux.cc:90: Could we use SIOCETHTOOL to identify ethernet devices? "ethtool" ...
5 years, 11 months ago (2015-01-28 00:27:53 UTC) #20
pauljensen
https://codereview.chromium.org/739983005/diff/120001/net/base/net_util_linux.h File net/base/net_util_linux.h (right): https://codereview.chromium.org/739983005/diff/120001/net/base/net_util_linux.h#newcode9 net/base/net_util_linux.h:9: // of net_util_linux.cc to tests. This comment needs to ...
5 years, 10 months ago (2015-01-28 15:14:46 UTC) #21
derekjchow1
https://codereview.chromium.org/739983005/diff/120001/net/base/net_util_linux.cc File net/base/net_util_linux.cc (right): https://codereview.chromium.org/739983005/diff/120001/net/base/net_util_linux.cc#newcode90 net/base/net_util_linux.cc:90: On 2015/01/28 00:27:53, pauljensen wrote: > Could we use ...
5 years, 10 months ago (2015-01-28 18:12:48 UTC) #22
pauljensen
https://codereview.chromium.org/739983005/diff/140001/net/base/address_tracker_linux.cc File net/base/address_tracker_linux.cc (right): https://codereview.chromium.org/739983005/diff/140001/net/base/address_tracker_linux.cc#newcode85 net/base/address_tracker_linux.cc:85: int ioctl_socket = socket(AF_INET, SOCK_DGRAM, 0); Can we use ...
5 years, 10 months ago (2015-01-28 19:05:04 UTC) #23
derekjchow1
https://codereview.chromium.org/739983005/diff/140001/net/base/address_tracker_linux.cc File net/base/address_tracker_linux.cc (right): https://codereview.chromium.org/739983005/diff/140001/net/base/address_tracker_linux.cc#newcode85 net/base/address_tracker_linux.cc:85: int ioctl_socket = socket(AF_INET, SOCK_DGRAM, 0); On 2015/01/28 19:05:04, ...
5 years, 10 months ago (2015-01-28 20:39:12 UTC) #24
pauljensen
https://codereview.chromium.org/739983005/diff/160001/net/base/address_tracker_linux.cc File net/base/address_tracker_linux.cc (right): https://codereview.chromium.org/739983005/diff/160001/net/base/address_tracker_linux.cc#newcode90 net/base/address_tracker_linux.cc:90: static struct ifreq ifr; um this shouldn't be static...that ...
5 years, 10 months ago (2015-01-28 21:15:55 UTC) #25
derekjchow1
https://codereview.chromium.org/739983005/diff/160001/net/base/address_tracker_linux.cc File net/base/address_tracker_linux.cc (right): https://codereview.chromium.org/739983005/diff/160001/net/base/address_tracker_linux.cc#newcode90 net/base/address_tracker_linux.cc:90: static struct ifreq ifr; On 2015/01/28 21:15:55, pauljensen wrote: ...
5 years, 10 months ago (2015-01-29 00:35:04 UTC) #26
pauljensen
https://codereview.chromium.org/739983005/diff/180001/net/base/net_util_linux.cc File net/base/net_util_linux.cc (right): https://codereview.chromium.org/739983005/diff/180001/net/base/net_util_linux.cc#newcode144 net/base/net_util_linux.cc:144: ifname.assign(get_interface_name(it->second.ifa_index, buffer)); You removed the write to ifnames; please ...
5 years, 10 months ago (2015-01-29 14:24:57 UTC) #27
derekjchow1
https://codereview.chromium.org/739983005/diff/180001/net/base/net_util_linux.cc File net/base/net_util_linux.cc (right): https://codereview.chromium.org/739983005/diff/180001/net/base/net_util_linux.cc#newcode144 net/base/net_util_linux.cc:144: ifname.assign(get_interface_name(it->second.ifa_index, buffer)); On 2015/01/29 14:24:57, pauljensen wrote: > You ...
5 years, 10 months ago (2015-01-29 18:14:36 UTC) #28
pauljensen
lgtm. Please this a fair bit before CQing. To test you can build net_watcher and ...
5 years, 10 months ago (2015-01-29 19:40:13 UTC) #29
derekjchow1
Test with my home PC running 14.04 with both ethernet and PCI wifi card. Works ...
5 years, 10 months ago (2015-01-30 04:46:06 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/739983005/220001
5 years, 10 months ago (2015-01-30 04:47:09 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_dbg/builds/37560) android_chromium_gn_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/54232)
5 years, 10 months ago (2015-01-30 04:55:06 UTC) #34
pauljensen
Hmm, looks like ethtool.h isn't included until Android NDK version 21 (Lollipop) which I assume ...
5 years, 10 months ago (2015-01-30 12:30:55 UTC) #35
derekjchow1
On 2015/01/30 12:30:55, pauljensen wrote: > Hmm, looks like ethtool.h isn't included until Android NDK ...
5 years, 10 months ago (2015-01-30 23:48:32 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/739983005/240001
5 years, 10 months ago (2015-01-30 23:49:35 UTC) #38
commit-bot: I haz the power
Committed patchset #13 (id:240001)
5 years, 10 months ago (2015-01-31 01:05:19 UTC) #39
commit-bot: I haz the power
5 years, 10 months ago (2015-01-31 01:06:26 UTC) #40
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/5482d5e52c66f72082ee243464d0e109b66419a9
Cr-Commit-Position: refs/heads/master@{#314042}

Powered by Google App Engine
This is Rietveld 408576698