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

Issue 64683014: Mac OS X-specific implementation of Networking Private API. (Closed)

Created:
7 years, 1 month ago by mef
Modified:
6 years, 10 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Mac OS X-specific implementation of Networking Private API. Based on infrastructure in http://crrev.com/54323003 BUG=330255 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247659

Patch Set 1 #

Patch Set 2 : Complete basic implementation of WiFiService on OS X. #

Patch Set 3 : Made networkingPrivateApi available on OS X. #

Patch Set 4 : Explicitly load CoreWLAN and retain CWInterface. #

Patch Set 5 : First successful setup run. #

Patch Set 6 : Sync to r240704 #

Patch Set 7 : GetProperties now use |networks_| information cached by GetVisibleNetworks. #

Patch Set 8 : Use Reachability to determine when WiFi network connection is complete. #

Patch Set 9 : Fix compilation errors. Add WLANListener. #

Patch Set 10 : Fix linker error. #

Patch Set 11 : Fix Win compilation error. #

Patch Set 12 : Better comments. #

Total comments: 16

Patch Set 13 : Address stevenjb's comments. #

Total comments: 4

Patch Set 14 : Address stevenjb's comment. #

Total comments: 109

Patch Set 15 : Address codereview comments. #

Total comments: 14

Patch Set 16 : Report connection_state as kConnecting until network is reachable. #

Patch Set 17 : Address Toni's comments. #

Patch Set 18 : In my testing this query doesn't return any items: #

Patch Set 19 : Remove ScopedNSAutoreleasePool. #

Total comments: 64

Patch Set 20 : Address codereview comments. #

Patch Set 21 : Address Toni's comments. #

Total comments: 16

Patch Set 22 : Address Roberts's comments. #

Total comments: 2

Patch Set 23 : Added NetworkChangeDetector that listens to NetworkChangeNotifier. #

Total comments: 8

Patch Set 24 : Explicitly track connected_network_guid and use it to notify network disconnect. #

Total comments: 16

Patch Set 25 : Address codereview comments. #

Total comments: 4

Patch Set 26 : Address Toni's comments. #

Patch Set 27 : Observe OnNetworkChanged in NPServiceClient and post them to WiFiService. #

Total comments: 22

Patch Set 28 : Address Toni's comments. #

Patch Set 29 : Fix trybot compilation error. #

Total comments: 4

Patch Set 30 : Address codereview comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+658 lines, -20 lines) Patch
M chrome/browser/extensions/api/networking_private/networking_private_service_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 3 chunks +11 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/networking_private/networking_private_service_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 4 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/api/_api_features.json View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/api/networking_private.json View 1 2 1 chunk +1 line, -1 line 0 comments Download
M components/wifi.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +9 lines, -0 lines 0 comments Download
M components/wifi/fake_wifi_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 chunks +4 lines, -2 lines 0 comments Download
M components/wifi/wifi_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 5 chunks +9 lines, -3 lines 0 comments Download
M components/wifi/wifi_service.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
A components/wifi/wifi_service_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 chunk +603 lines, -0 lines 0 comments Download
M components/wifi/wifi_service_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 chunks +3 lines, -3 lines 0 comments Download
M components/wifi/wifi_test.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 43 (0 generated)
mef
Hi, whenever you have a change (probably after New Year), please take a look at ...
6 years, 12 months ago (2013-12-27 18:43:39 UTC) #1
stevenjb
https://codereview.chromium.org/64683014/diff/500001/chrome/browser/extensions/api/networking_private/networking_private_api_nonchromeos.cc File chrome/browser/extensions/api/networking_private/networking_private_api_nonchromeos.cc (right): https://codereview.chromium.org/64683014/diff/500001/chrome/browser/extensions/api/networking_private/networking_private_api_nonchromeos.cc#newcode397 chrome/browser/extensions/api/networking_private/networking_private_api_nonchromeos.cc:397: const std::string& error_name, const std::string& error) { one arg ...
6 years, 12 months ago (2013-12-27 19:53:44 UTC) #2
mef
Thanks, Steven! https://codereview.chromium.org/64683014/diff/500001/chrome/browser/extensions/api/networking_private/networking_private_api_nonchromeos.cc File chrome/browser/extensions/api/networking_private/networking_private_api_nonchromeos.cc (right): https://codereview.chromium.org/64683014/diff/500001/chrome/browser/extensions/api/networking_private/networking_private_api_nonchromeos.cc#newcode397 chrome/browser/extensions/api/networking_private/networking_private_api_nonchromeos.cc:397: const std::string& error_name, const std::string& error) { ...
6 years, 12 months ago (2013-12-27 21:08:12 UTC) #3
stevenjb
Non Mac specific bits lgtm https://codereview.chromium.org/64683014/diff/560001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/560001/components/wifi/wifi_service_mac.mm#newcode217 components/wifi/wifi_service_mac.mm:217: static const int kMaxAssociationAttempts ...
6 years, 12 months ago (2013-12-27 21:22:05 UTC) #4
mef
Steven, thanks! Everybody else: please take a look. https://codereview.chromium.org/64683014/diff/560001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/560001/components/wifi/wifi_service_mac.mm#newcode217 components/wifi/wifi_service_mac.mm:217: static ...
6 years, 11 months ago (2014-01-06 20:23:41 UTC) #5
arw
lgtm Took a look at the Mac portion. Looks good, just one small comment. https://codereview.chromium.org/64683014/diff/560001/components/wifi/wifi_service_mac.mm ...
6 years, 11 months ago (2014-01-06 23:08:54 UTC) #6
Robert Sesek
Drive-by Mac internals review. https://codereview.chromium.org/64683014/diff/670001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/670001/components/wifi/wifi_service_mac.mm#newcode13 components/wifi/wifi_service_mac.mm:13: #import <netinet/in.h> These headers come ...
6 years, 11 months ago (2014-01-07 16:19:04 UTC) #7
tbarzic
https://codereview.chromium.org/64683014/diff/670001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/670001/components/wifi/wifi_service_mac.mm#newcode52 components/wifi/wifi_service_mac.mm:52: // Observe CoreWLAN notifications and call |WiFiServiceImpl| on worker ...
6 years, 11 months ago (2014-01-07 20:05:32 UTC) #8
mef
Thanks a lot for your comments, I've addressed most of them, and added follow-up questions ...
6 years, 11 months ago (2014-01-08 21:00:02 UTC) #9
tbarzic
https://codereview.chromium.org/64683014/diff/670001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/670001/components/wifi/wifi_service_mac.mm#newcode392 components/wifi/wifi_service_mac.mm:392: // have valid IP address). On 2014/01/08 21:00:03, mef ...
6 years, 11 months ago (2014-01-08 23:06:22 UTC) #10
mef
Thanks Toni, PTAL! https://codereview.chromium.org/64683014/diff/740001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/740001/components/wifi/wifi_service_mac.mm#newcode1 components/wifi/wifi_service_mac.mm:1: // Copyright 2013 The Chromium Authors. ...
6 years, 11 months ago (2014-01-09 22:41:46 UTC) #11
Robert Sesek
I'm sorry I didn't get to do a full pass today, but I will tomorrow. ...
6 years, 11 months ago (2014-01-09 23:12:44 UTC) #12
mef
Thanks, PTAL. https://codereview.chromium.org/64683014/diff/670001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/670001/components/wifi/wifi_service_mac.mm#newcode19 components/wifi/wifi_service_mac.mm:19: const char* kCWSSIDDidChangeNotification_chrome = On 2014/01/09 23:12:45, ...
6 years, 11 months ago (2014-01-10 17:01:52 UTC) #13
Robert Sesek
https://codereview.chromium.org/64683014/diff/670001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/670001/components/wifi/wifi_service_mac.mm#newcode226 components/wifi/wifi_service_mac.mm:226: // As the WLAN api binding runs on its ...
6 years, 11 months ago (2014-01-10 18:59:50 UTC) #14
mef
Thanks a lot. At this point I believe I've addressed all open issues, PTAL. https://codereview.chromium.org/64683014/diff/670001/components/wifi/wifi_service_mac.mm ...
6 years, 11 months ago (2014-01-10 20:26:16 UTC) #15
Robert Sesek
Mostly nits, but some comments about control flow. https://codereview.chromium.org/64683014/diff/940001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/940001/components/wifi/wifi_service_mac.mm#newcode195 components/wifi/wifi_service_mac.mm:195: void ...
6 years, 11 months ago (2014-01-13 19:10:28 UTC) #16
tbarzic
https://codereview.chromium.org/64683014/diff/940001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/940001/components/wifi/wifi_service_mac.mm#newcode267 components/wifi/wifi_service_mac.mm:267: NotifyNetworkListChanged(networks_); NotifyNetworkListChanged should be part of UpdateNetworks. And potentially, ...
6 years, 11 months ago (2014-01-13 19:39:30 UTC) #17
mef
Robert, thanks! I'll try to use Reachability notification instead of polling, and this may make ...
6 years, 11 months ago (2014-01-13 22:05:34 UTC) #18
mef
Toni, thanks! PTAL, and couple of followup questions... thanks, -m https://codereview.chromium.org/64683014/diff/940001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/940001/components/wifi/wifi_service_mac.mm#newcode267 ...
6 years, 11 months ago (2014-01-14 22:10:31 UTC) #19
Robert Sesek
https://codereview.chromium.org/64683014/diff/1030001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/1030001/components/wifi/wifi_service_mac.mm#newcode157 components/wifi/wifi_service_mac.mm:157: NSObject* wlan_observer_; This should be |id|, not |NSObject*|. https://codereview.chromium.org/64683014/diff/1030001/components/wifi/wifi_service_mac.mm#newcode177 ...
6 years, 11 months ago (2014-01-15 16:26:34 UTC) #20
mef
Robert, thanks! https://codereview.chromium.org/64683014/diff/1030001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/1030001/components/wifi/wifi_service_mac.mm#newcode157 components/wifi/wifi_service_mac.mm:157: NSObject* wlan_observer_; On 2014/01/15 16:26:35, rsesek wrote: ...
6 years, 11 months ago (2014-01-15 16:57:24 UTC) #21
Robert Sesek
This is in pretty good shape now. Any updates on using SCReachabiilty? Also, I have ...
6 years, 11 months ago (2014-01-15 22:20:27 UTC) #22
mef
On 2014/01/15 22:20:27, rsesek wrote: > This is in pretty good shape now. Any updates ...
6 years, 11 months ago (2014-01-15 23:09:05 UTC) #23
mef
I would like to humbly ask for OWNER review of these changes: erg@ - chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc ...
6 years, 11 months ago (2014-01-15 23:17:25 UTC) #24
Elliot Glaysher
lgtm
6 years, 11 months ago (2014-01-16 01:20:11 UTC) #25
Finnur
OWNERS LGTM
6 years, 11 months ago (2014-01-16 10:27:19 UTC) #26
Robert Sesek
On 2014/01/15 23:09:05, mef wrote: > On 2014/01/15 22:20:27, rsesek wrote: > > This is ...
6 years, 11 months ago (2014-01-16 17:57:21 UTC) #27
tbarzic
mostly looks ok. https://codereview.chromium.org/64683014/diff/940001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/940001/components/wifi/wifi_service_mac.mm#newcode255 components/wifi/wifi_service_mac.mm:255: RequestNetworkScan(); On 2014/01/13 22:05:34, mef wrote: ...
6 years, 11 months ago (2014-01-16 19:41:47 UTC) #28
mef
Hi, PTAL. I've added NetworkChangeObserver. I start and stop it on IO thread and post ...
6 years, 11 months ago (2014-01-16 23:42:47 UTC) #29
tbarzic
Yeah, the extension doesn't always call getProperties when it gets NetworksChanged notification. But it should ...
6 years, 11 months ago (2014-01-17 00:09:48 UTC) #30
mef
Hi guys, PTAL. It turned out that system events observers were posting tasks to NotifyNetworkChanged, ...
6 years, 11 months ago (2014-01-23 21:17:13 UTC) #31
Robert Sesek
I don't think the NetworkChangeObserver adds too much complexity, but whether you want to suck ...
6 years, 11 months ago (2014-01-27 18:06:54 UTC) #32
mef
Hi Robert, thanks a lot, PTAL. BTW, is there a better thread than BrowserThread::IO for ...
6 years, 11 months ago (2014-01-27 19:44:37 UTC) #33
tbarzic
https://codereview.chromium.org/64683014/diff/1230001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/1230001/components/wifi/wifi_service_mac.mm#newcode81 components/wifi/wifi_service_mac.mm:81: net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this); is it ok if this doesn't get called ...
6 years, 11 months ago (2014-01-27 20:17:23 UTC) #34
mef
Hi Toni, thanks for your comments! I've addressed most of them and have followup questions ...
6 years, 11 months ago (2014-01-27 23:08:26 UTC) #35
mef
Hi guys, PTAL. I've moved net::NetworkChangeNotifier observer implementation to NetworkingPrivateServiceClient (notified on UI thread) and ...
6 years, 11 months ago (2014-01-28 00:47:51 UTC) #36
tbarzic
https://codereview.chromium.org/64683014/diff/1500001/chrome/browser/extensions/api/networking_private/networking_private_service_client.h File chrome/browser/extensions/api/networking_private/networking_private_service_client.h (right): https://codereview.chromium.org/64683014/diff/1500001/chrome/browser/extensions/api/networking_private/networking_private_service_client.h#newcode40 chrome/browser/extensions/api/networking_private/networking_private_service_client.h:40: // them on worker thread. Always used from UI ...
6 years, 11 months ago (2014-01-28 02:05:02 UTC) #37
mef
Toni, thanks, PTAL! https://codereview.chromium.org/64683014/diff/1500001/chrome/browser/extensions/api/networking_private/networking_private_service_client.h File chrome/browser/extensions/api/networking_private/networking_private_service_client.h (right): https://codereview.chromium.org/64683014/diff/1500001/chrome/browser/extensions/api/networking_private/networking_private_service_client.h#newcode40 chrome/browser/extensions/api/networking_private/networking_private_service_client.h:40: // them on worker thread. Always ...
6 years, 10 months ago (2014-01-28 14:39:36 UTC) #38
tbarzic
lgtm https://codereview.chromium.org/64683014/diff/1540001/components/wifi/wifi_service_mac.mm File components/wifi/wifi_service_mac.mm (right): https://codereview.chromium.org/64683014/diff/1540001/components/wifi/wifi_service_mac.mm#newcode297 components/wifi/wifi_service_mac.mm:297: if (network_guid == connected_network_guid) { nit: drop {}
6 years, 10 months ago (2014-01-28 18:10:42 UTC) #39
Robert Sesek
LGTM https://codereview.chromium.org/64683014/diff/1540001/chrome/browser/extensions/api/networking_private/networking_private_service_client.cc File chrome/browser/extensions/api/networking_private/networking_private_service_client.cc (right): https://codereview.chromium.org/64683014/diff/1540001/chrome/browser/extensions/api/networking_private/networking_private_service_client.cc#newcode170 chrome/browser/extensions/api/networking_private/networking_private_service_client.cc:170: FROM_HERE, nit: indent 2 more
6 years, 10 months ago (2014-01-28 18:28:19 UTC) #40
mef
Thanks! https://codereview.chromium.org/64683014/diff/1540001/chrome/browser/extensions/api/networking_private/networking_private_service_client.cc File chrome/browser/extensions/api/networking_private/networking_private_service_client.cc (right): https://codereview.chromium.org/64683014/diff/1540001/chrome/browser/extensions/api/networking_private/networking_private_service_client.cc#newcode170 chrome/browser/extensions/api/networking_private/networking_private_service_client.cc:170: FROM_HERE, On 2014/01/28 18:28:20, rsesek wrote: > nit: ...
6 years, 10 months ago (2014-01-28 18:54:30 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mef@chromium.org/64683014/1550001
6 years, 10 months ago (2014-01-28 18:56:01 UTC) #42
commit-bot: I haz the power
6 years, 10 months ago (2014-01-29 07:34:40 UTC) #43
Message was sent while issue was closed.
Change committed as 247659

Powered by Google App Engine
This is Rietveld 408576698