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

Issue 11614035: Improve NetworkStateHandler API (Closed)

Created:
8 years ago by stevenjb
Modified:
8 years ago
CC:
chromium-reviews, sadrul, ben+watch_chromium.org, gspencer+watch_chromium.org, gauravsh+watch_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org
Visibility:
Public.

Description

Improve NetworkStateHandler API The UI needs more flexible accessors than "ActiveNetwork," which is also a somewhat unclear term. This replaces it with DefaultNetwork and provides better accessors for the UI. BUG=none For webui: TBR=jhawkins@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=174288

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : Update tests #

Patch Set 4 : Restore ActiveNetwork() as DefaultNetwork() #

Patch Set 5 : Fix TrayNetworkStateObserver #

Total comments: 15

Patch Set 6 : Address feedback, state -> connection state #

Total comments: 11

Patch Set 7 : NetworkPropertyChanged -> NetworkPropertiesUpdated #

Patch Set 8 : Rebase #

Total comments: 4

Patch Set 9 : Separate out OnDefaultNetworkChanged and move kMatchType* to NetworkStateHandler #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+254 lines, -151 lines) Patch
M ash/system/chromeos/network/network_icon.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M ash/system/chromeos/network/network_state_list_detailed_view.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M ash/system/chromeos/network/tray_network_state_observer.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ash/system/chromeos/network/tray_network_state_observer.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/chromeos/about_network.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chromeos/network/network_state.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -4 lines 0 comments Download
M chromeos/network/network_state.cc View 1 2 3 4 5 6 7 8 2 chunks +11 lines, -11 lines 0 comments Download
M chromeos/network/network_state_handler.h View 1 2 3 4 5 6 7 8 7 chunks +41 lines, -22 lines 0 comments Download
M chromeos/network/network_state_handler.cc View 1 2 3 4 5 6 7 8 9 chunks +79 lines, -36 lines 2 comments Download
M chromeos/network/network_state_handler_observer.h View 1 2 3 4 5 6 1 chunk +12 lines, -11 lines 0 comments Download
M chromeos/network/network_state_handler_observer.cc View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M chromeos/network/network_state_handler_unittest.cc View 1 2 3 4 5 6 7 8 5 chunks +97 lines, -57 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
stevenjb
OK, after a bit of back and forth with myself, here is what I decided ...
8 years ago (2012-12-19 04:10:11 UTC) #1
pneubeck (no reviews)
If find the updates and notifications to DefaultNetworkChanged rather scattered in the code and hard ...
8 years ago (2012-12-19 15:22:38 UTC) #2
stevenjb
On 2012/12/19 15:22:38, pneubeck wrote: > If find the updates and notifications to DefaultNetworkChanged rather ...
8 years ago (2012-12-19 17:59:28 UTC) #3
stevenjb
https://codereview.chromium.org/11614035/diff/8019/chromeos/network/network_state.h File chromeos/network/network_state.h (right): https://codereview.chromium.org/11614035/diff/8019/chromeos/network/network_state.h#newcode42 chromeos/network/network_state.h:42: // * kMatchTypeDefault to match any network On 2012/12/19 ...
8 years ago (2012-12-19 18:01:07 UTC) #4
pneubeck (no reviews)
Overall, my only major concern is the usage of the word "changed" throughout the implementation. ...
8 years ago (2012-12-19 19:40:06 UTC) #5
stevenjb
"Changed" and "Updated" (may have changed) should now be accurate. https://codereview.chromium.org/11614035/diff/3020/chromeos/network/network_state_handler.cc File chromeos/network/network_state_handler.cc (right): https://codereview.chromium.org/11614035/diff/3020/chromeos/network/network_state_handler.cc#newcode290 ...
8 years ago (2012-12-19 21:36:50 UTC) #6
pneubeck (no reviews)
Looks good to me. Considering our last discussion about error handling in chromeos/network/onc/*, which now ...
8 years ago (2012-12-19 22:04:35 UTC) #7
stevenjb (google-dont-use)
That's a fair point about value updates, I'd forgotten that we already had wrappers. I'll ...
8 years ago (2012-12-19 22:19:29 UTC) #8
gauravsh
Can you update the commit message with more detail (since there's no linked bug). https://codereview.chromium.org/11614035/diff/7007/chromeos/network/network_state_handler.cc ...
8 years ago (2012-12-19 23:48:00 UTC) #9
gauravsh
and lgtm modulo the nits in my previous message
8 years ago (2012-12-19 23:50:15 UTC) #10
stevenjb
Addressed feedback and moved kMatchType* to NetworkStateHandler because I think they make more sense there; ...
8 years ago (2012-12-20 02:17:50 UTC) #11
Greg Spencer (Chromium)
LGTM https://codereview.chromium.org/11614035/diff/7010/chromeos/network/network_state_handler.cc File chromeos/network/network_state_handler.cc (right): https://codereview.chromium.org/11614035/diff/7010/chromeos/network/network_state_handler.cc#newcode480 chromeos/network/network_state_handler.cc:480: network_event_log::AddEntry( Do you want to use the NET_LOG ...
8 years ago (2012-12-20 17:37:47 UTC) #12
stevenjb
https://codereview.chromium.org/11614035/diff/7010/chromeos/network/network_state_handler.cc File chromeos/network/network_state_handler.cc (right): https://codereview.chromium.org/11614035/diff/7010/chromeos/network/network_state_handler.cc#newcode480 chromeos/network/network_state_handler.cc:480: network_event_log::AddEntry( On 2012/12/20 17:37:47, Greg Spencer (Chromium) wrote: > ...
8 years ago (2012-12-20 17:46:26 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stevenjb@chromium.org/11614035/7010
8 years ago (2012-12-20 17:46:39 UTC) #14
commit-bot: I haz the power
Presubmit check for 11614035-7010 failed and returned exit status 1. Running presubmit commit checks ...
8 years ago (2012-12-20 17:46:45 UTC) #15
commit-bot: I haz the power
8 years ago (2012-12-20 17:50:49 UTC) #16

Powered by Google App Engine
This is Rietveld 408576698