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

Issue 11367048: This is the first pass at making GetIPConfigs asynchronous. (Closed)

Created:
8 years, 1 month ago by Greg Spencer (Chromium)
Modified:
8 years, 1 month ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, nkostylev+watch_chromium.org, gspencer+watch_chromium.org, gauravsh+watch_chromium.org, darin-cc_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

This is the first pass at making GetIPConfigs asynchronous. This renames the old GetIPConfigs to GetIPConfigsAndBlock, and deprecates it. Several sites which used to use the old blocking GetIPConfigs have been rewritten to use the non-blocking asynchronous version. There are still two places that were too complex to convert: MoreMenuModel::InitMenuItems SystemTrayDelegate::GetNetworkAddresses Both of those sites rely on getting their results immediately and would need their callers to change significantly to switch to async. In order to allow the IPConfigs to be fetched asynchronously, we need to both get the shill properties for the service and the ipconfigs, so we have to have two layers of async calls. This requires that we convert DictionaryValueCallbacks to use scoped_ptrs so we can avoid a deep copy of the properties. BUG=chromium:147657 TEST=ran on device, tested network menus and settings. Ran unit tests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=167427

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 2

Patch Set 5 : Removed scoped_ptr changes #

Total comments: 8

Patch Set 6 : review changes #

Total comments: 2

Patch Set 7 : review changes #

Patch Set 8 : fix hardware address format in internet options handler #

Total comments: 3

Patch Set 9 : fix callbacks to not use Network* #

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+242 lines, -61 lines) Patch
M chrome/browser/chromeos/cros/cros_network_functions.h View 1 2 3 4 1 chunk +14 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/cros/cros_network_functions.cc View 1 2 3 4 2 chunks +41 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/cros/cros_network_functions_unittest.cc View 3 4 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/cros/mock_network_library.h View 1 2 1 chunk +7 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/cros/network_ip_config.h View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/cros/network_library.h View 1 2 3 4 5 6 7 4 chunks +22 lines, -12 lines 0 comments Download
M chrome/browser/chromeos/cros/network_library.cc View 1 2 3 4 5 3 chunks +22 lines, -13 lines 0 comments Download
M chrome/browser/chromeos/cros/network_library_impl_cros.h View 1 2 3 4 2 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/chromeos/cros/network_library_impl_cros.cc View 1 2 3 4 1 chunk +41 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/cros/network_library_impl_stub.h View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/chromeos/cros/network_library_impl_stub.cc View 1 2 1 chunk +8 lines, -1 line 0 comments Download
M chrome/browser/chromeos/net/network_change_notifier_chromeos.h View 1 chunk +7 lines, -1 line 0 comments Download
M chrome/browser/chromeos/net/network_change_notifier_chromeos.cc View 1 chunk +16 lines, -1 line 0 comments Download
M chrome/browser/chromeos/status/network_menu.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/system/ash_system_tray_delegate.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/chromeos/internet_options_handler.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc View 1 2 3 4 5 6 7 8 9 3 chunks +25 lines, -7 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
Greg Spencer (Chromium)
http://codereview.chromium.org/11367048/diff/2002/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc File chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc (right): http://codereview.chromium.org/11367048/diff/2002/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc#newcode1235 chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc:1235: base::Passed(&shill_properties))); This is why the dictionary callback needs to ...
8 years, 1 month ago (2012-11-05 21:05:31 UTC) #1
stevenjb
Discussed concerns about introducing scoped_ptr<> to APIs we are in the process of deprecating in-person. ...
8 years, 1 month ago (2012-11-05 23:22:57 UTC) #2
Greg Spencer (Chromium)
On 2012/11/05 23:22:57, stevenjb (chromium) wrote: > Discussed concerns about introducing scoped_ptr<> to APIs we ...
8 years, 1 month ago (2012-11-12 19:28:38 UTC) #3
Greg Spencer (Chromium)
On 2012/11/12 19:28:38, Greg Spencer (Chromium) wrote: > Well, but to look it up, I ...
8 years, 1 month ago (2012-11-12 20:17:56 UTC) #4
Greg Spencer (Chromium)
OK, I've removed the scoped_ptr changes, and gotten rid of the weak pointer factor in ...
8 years, 1 month ago (2012-11-12 20:27:55 UTC) #5
stevenjb
http://codereview.chromium.org/11367048/diff/10002/chrome/browser/chromeos/cros/network_library.cc File chrome/browser/chromeos/cros/network_library.cc (right): http://codereview.chromium.org/11367048/diff/10002/chrome/browser/chromeos/cros/network_library.cc#newcode519 chrome/browser/chromeos/cros/network_library.cc:519: device_path_)); service_path_ http://codereview.chromium.org/11367048/diff/10002/chrome/browser/chromeos/cros/network_library.cc#newcode525 chrome/browser/chromeos/cros/network_library.cc:525: const std::string& device_path, service_path http://codereview.chromium.org/11367048/diff/10002/chrome/browser/chromeos/cros/network_library.h ...
8 years, 1 month ago (2012-11-12 20:40:45 UTC) #6
Greg Spencer (Chromium)
http://codereview.chromium.org/11367048/diff/10002/chrome/browser/chromeos/cros/network_library.cc File chrome/browser/chromeos/cros/network_library.cc (right): http://codereview.chromium.org/11367048/diff/10002/chrome/browser/chromeos/cros/network_library.cc#newcode519 chrome/browser/chromeos/cros/network_library.cc:519: device_path_)); On 2012/11/12 20:40:45, stevenjb (chromium) wrote: > service_path_ ...
8 years, 1 month ago (2012-11-12 20:56:03 UTC) #7
stevenjb
LGTM w/ nit http://codereview.chromium.org/11367048/diff/10002/chrome/browser/chromeos/cros/network_library.h File chrome/browser/chromeos/cros/network_library.h (right): http://codereview.chromium.org/11367048/diff/10002/chrome/browser/chromeos/cros/network_library.h#newcode612 chrome/browser/chromeos/cros/network_library.h:612: const std::string& hardware_address); On 2012/11/12 20:56:03, ...
8 years, 1 month ago (2012-11-12 21:17:27 UTC) #8
Greg Spencer (Chromium)
http://codereview.chromium.org/11367048/diff/10002/chrome/browser/chromeos/cros/network_library.h File chrome/browser/chromeos/cros/network_library.h (right): http://codereview.chromium.org/11367048/diff/10002/chrome/browser/chromeos/cros/network_library.h#newcode612 chrome/browser/chromeos/cros/network_library.h:612: const std::string& hardware_address); On 2012/11/12 21:17:27, stevenjb (chromium) wrote: ...
8 years, 1 month ago (2012-11-12 21:39:35 UTC) #9
Greg Spencer (Chromium)
Dmitry, could you please do an OWNERS review for me on this for internet_options_handler.*?
8 years, 1 month ago (2012-11-12 21:42:27 UTC) #10
Dmitry Polukhin
http://codereview.chromium.org/11367048/diff/6036/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc File chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc (right): http://codereview.chromium.org/11367048/diff/6036/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc#newcode1238 chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc:1238: network, I haven't write this code initially so I ...
8 years, 1 month ago (2012-11-12 23:02:28 UTC) #11
stevenjb
http://codereview.chromium.org/11367048/diff/6036/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc File chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc (right): http://codereview.chromium.org/11367048/diff/6036/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc#newcode1238 chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc:1238: network, On 2012/11/12 23:02:28, Dmitry Polukhin wrote: > I ...
8 years, 1 month ago (2012-11-12 23:09:43 UTC) #12
Greg Spencer (Chromium)
http://codereview.chromium.org/11367048/diff/6036/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc File chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc (right): http://codereview.chromium.org/11367048/diff/6036/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc#newcode1238 chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc:1238: network, On 2012/11/12 23:09:43, stevenjb (chromium) wrote: > On ...
8 years, 1 month ago (2012-11-13 00:04:59 UTC) #13
Dmitry Polukhin
LGTM Thank you for fixing network lifetime issue!
8 years, 1 month ago (2012-11-13 00:07:55 UTC) #14
stevenjb
Thanks! LGTM
8 years, 1 month ago (2012-11-13 00:13:39 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gspencer@chromium.org/11367048/12021
8 years, 1 month ago (2012-11-13 00:55:00 UTC) #16
commit-bot: I haz the power
Retried try job too often for step(s) content_browsertests
8 years, 1 month ago (2012-11-13 02:56:01 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gspencer@chromium.org/11367048/12021
8 years, 1 month ago (2012-11-13 17:45:05 UTC) #18
commit-bot: I haz the power
8 years, 1 month ago (2012-11-13 18:34:00 UTC) #19
Change committed as 167427

Powered by Google App Engine
This is Rietveld 408576698