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

Issue 9147026: API for connection type (Ethernet/WIFI/WWAN ...) in NetworkChangeNotifier. (Closed)

Created:
8 years, 11 months ago by droger_google
Modified:
8 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, jam, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Support for navigator.connection API This replaces the online state (a boolean) by a more complex state (UNKNOWN/NONE /2G/3G/4G/WIFI/ETHERNET) inspired by the Network Information API (http://www.w3.org/TR/netinfo-api/). Breakdown of the modified files: - network_change_notifier.h/.cc: actual API change - network_change_notifier_*: platform specific implementations. This CL only provide a basic implementation where CONNECTION_UNKNOWN is returned when online and CONNECTION_NONE is returned when offline. - other files: call sites for the static function and observer implementations. Most of the time this only changes the test IsOffline() by (GetConnectionType() == CONNECTION_NONE). BUG=112937 TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=138780

Patch Set 1 #

Total comments: 9

Patch Set 2 : joth comments #

Patch Set 3 : Fixed indentation in old code #

Total comments: 2

Patch Set 4 : Changed type name and enum names. #

Patch Set 5 : Fix some compilation issues #

Patch Set 6 : More compilation fixes #

Patch Set 7 : Fix android compilation #

Patch Set 8 : CONNECTION_UNKNOWN as default value #

Patch Set 9 : sync #

Total comments: 29

Patch Set 10 : Review comments #

Total comments: 4

Patch Set 11 : Review comments #

Patch Set 12 : sync #

Total comments: 1

Patch Set 13 : Fixed a typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -191 lines) Patch
M chrome/browser/chromeos/login/login_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +19 lines, -15 lines 0 comments Download
M chrome/browser/chromeos/net/network_change_notifier_chromeos.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/chromeos/net/network_change_notifier_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/offline/offline_load_page.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/offline/offline_load_page.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/web_socket_proxy_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/sessions/session_restore.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +9 lines, -7 lines 0 comments Download
M content/browser/net/browser_online_state_observer.h View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M content/browser/net/browser_online_state_observer.cc View 1 2 3 1 chunk +6 lines, -4 lines 0 comments Download
M content/browser/ppapi_plugin_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +9 lines, -7 lines 0 comments Download
M net/android/network_change_notifier_android.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M net/android/network_change_notifier_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -4 lines 0 comments Download
M net/base/network_change_notifier.h View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +40 lines, -16 lines 0 comments Download
M net/base/network_change_notifier.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +21 lines, -17 lines 0 comments Download
M net/base/network_change_notifier_linux.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M net/base/network_change_notifier_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +15 lines, -11 lines 0 comments Download
M net/base/network_change_notifier_linux_unittest.cc View 1 2 3 4 5 6 7 8 9 6 chunks +34 lines, -20 lines 0 comments Download
M net/base/network_change_notifier_mac.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +8 lines, -14 lines 0 comments Download
M net/base/network_change_notifier_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +28 lines, -21 lines 0 comments Download
M net/base/network_change_notifier_win.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -3 lines 0 comments Download
M net/base/network_change_notifier_win.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +15 lines, -10 lines 0 comments Download
M net/base/network_change_notifier_win_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -2 lines 0 comments Download
M net/url_request/url_request_throttler_manager.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -3 lines 0 comments Download
M net/url_request/url_request_throttler_manager.cc View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -4 lines 0 comments Download
M net/url_request/url_request_throttler_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -2 lines 0 comments Download
M remoting/host/signaling_connector.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -4 lines 0 comments Download
M remoting/host/signaling_connector.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
joth
a couple drive by comments. Thanks for doing this, it will be useful for platforms ...
8 years, 11 months ago (2012-01-10 10:48:35 UTC) #1
droger_google
Thank you joth, I applied some comments and responded to others. http://codereview.chromium.org/9147026/diff/1/net/base/network_change_notifier.cc File net/base/network_change_notifier.cc (right): ...
8 years, 11 months ago (2012-01-10 11:48:26 UTC) #2
mmenke
Quick driveby comments: Not a Chrome OS guy, but thought I'd point you at chrome/browser/chromeos/net/network_change_notifier_chromeos.h. ...
8 years, 11 months ago (2012-01-10 21:59:10 UTC) #3
wtc
http://codereview.chromium.org/9147026/diff/8001/net/base/network_change_notifier.h File net/base/network_change_notifier.h (right): http://codereview.chromium.org/9147026/diff/8001/net/base/network_change_notifier.h#newcode27 net/base/network_change_notifier.h:27: enum ConnectionState { This enum type should be named ...
8 years, 11 months ago (2012-01-12 23:27:57 UTC) #4
droger_google
Reviving this very old CL. I have fixed all the call sites now, and tested ...
8 years, 7 months ago (2012-05-02 11:46:07 UTC) #5
droger_google
Added OWNERS reviewers.
8 years, 7 months ago (2012-05-10 15:44:00 UTC) #6
marja
chrome/browser/sessions/session_restore.cc LGTM
8 years, 7 months ago (2012-05-10 15:48:23 UTC) #7
whywhat
On 2012/05/10 15:48:23, marja wrote: > chrome/browser/sessions/session_restore.cc LGTM Replaced myself with Nikita as a better ...
8 years, 7 months ago (2012-05-10 15:55:53 UTC) #8
Nikita (slow)
+Steven
8 years, 7 months ago (2012-05-10 16:06:05 UTC) #9
stevenjb
chroem/browser/chromeos/ changes lgtm.
8 years, 7 months ago (2012-05-10 17:07:30 UTC) #10
wtc
Review comments on patch set 9: This seems good. Most of my comments below are ...
8 years, 7 months ago (2012-05-11 01:35:05 UTC) #11
droger_google
Thank you for the very detailed comments. I put back the IsOffline() method to avoid ...
8 years, 7 months ago (2012-05-11 16:10:21 UTC) #12
jar (doing other things)
On 2012/05/11 01:35:05, wtc wrote: > Review comments on patch set 9: > > This ...
8 years, 7 months ago (2012-05-11 18:44:51 UTC) #13
wtc
Patch set 10 LGTM. Thanks. Please go over the CL's description to make sure it ...
8 years, 7 months ago (2012-05-11 18:46:22 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/droger@google.com/9147026/50003
8 years, 7 months ago (2012-05-23 12:14:58 UTC) #15
commit-bot: I haz the power
Presubmit check for 9147026-50003 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 7 months ago (2012-05-23 12:15:28 UTC) #16
droger_google
I am still missing approval for: - remoting (added sergeyu) - content/browser (added sky)
8 years, 7 months ago (2012-05-23 12:21:55 UTC) #17
sky
LGTM
8 years, 7 months ago (2012-05-23 14:08:31 UTC) #18
Sergey Ulanov
remoting - lgtm http://codereview.chromium.org/9147026/diff/50003/net/base/network_change_notifier.h File net/base/network_change_notifier.h (right): http://codereview.chromium.org/9147026/diff/50003/net/base/network_change_notifier.h#newcode41 net/base/network_change_notifier.h:41: // Using the terminology of the ...
8 years, 7 months ago (2012-05-23 17:51:00 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/droger@google.com/9147026/50003
8 years, 7 months ago (2012-05-24 09:27:52 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/droger@google.com/9147026/67003
8 years, 7 months ago (2012-05-24 09:33:19 UTC) #21
commit-bot: I haz the power
8 years, 7 months ago (2012-05-24 11:30:08 UTC) #22
Change committed as 138780

Powered by Google App Engine
This is Rietveld 408576698