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

Issue 2679423008: Defer NetworkConfigurationHandler::CreateShillConfiguration callback (Closed)

Created:
3 years, 10 months ago by stevenjb
Modified:
3 years, 10 months ago
Reviewers:
tbarzic
CC:
chromium-reviews, stevenjb+watch_chromium.org, oshima+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Defer NetworkConfigurationHandler::CreateShillConfiguration callback Currently the code calls the NetworkConfigurationHandler ::CreateShillConfiguration callback immediately, which is only valid if Shill updates Chrome with the new network configuration in the same frame as the configuration was applied. At some point the Shill behavior Chrome, breaking the (fragile) Chrome network cofiguration layer. This CL defers the configuration success callback until the NetworkStateHandler has been updated with the new configuration (allowing a subsequent connection attempt to succeed). This CL also replaces SupportsWeakPtr with the more reliable WeakPtrFactory (apologies for the churn). BUG=662571 Review-Url: https://codereview.chromium.org/2679423008 Cr-Commit-Position: refs/heads/master@{#449787} Committed: https://chromium.googlesource.com/chromium/src/+/4be001fc71af06d07cb05c30e4b0665efadefed5

Patch Set 1 #

Total comments: 10

Patch Set 2 : Remove observer and fix/clarify comments #

Total comments: 2

Patch Set 3 : Remove observer in OnShuttingDown #

Patch Set 4 : Fix tests #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -35 lines) Patch
M chrome/browser/chromeos/net/network_throttling_observer_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/network/auto_connect_handler_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 2 comments Download
M chromeos/network/client_cert_resolver_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/network/host_resolver_impl_chromeos_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/network/managed_network_configuration_handler_unittest.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chromeos/network/network_cert_migrator_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/network/network_configuration_handler.h View 1 2 5 chunks +17 lines, -3 lines 0 comments Download
M chromeos/network/network_configuration_handler.cc View 1 2 11 chunks +64 lines, -31 lines 0 comments Download
M chromeos/network/network_configuration_handler_unittest.cc View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M chromeos/network/network_connection_handler_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/network/network_device_handler_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/network/network_state_handler_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/network/prohibited_technologies_handler_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 18 (7 generated)
stevenjb
3 years, 10 months ago (2017-02-10 00:46:30 UTC) #3
tbarzic
https://codereview.chromium.org/2679423008/diff/1/chromeos/network/network_configuration_handler.cc File chromeos/network/network_configuration_handler.cc (right): https://codereview.chromium.org/2679423008/diff/1/chromeos/network/network_configuration_handler.cc#newcode412 chromeos/network/network_configuration_handler.cc:412: network_state_handler_->AddObserver(this, FROM_HERE); the observer is never removed - and ...
3 years, 10 months ago (2017-02-10 19:20:05 UTC) #4
stevenjb
https://codereview.chromium.org/2679423008/diff/1/chromeos/network/network_configuration_handler.cc File chromeos/network/network_configuration_handler.cc (right): https://codereview.chromium.org/2679423008/diff/1/chromeos/network/network_configuration_handler.cc#newcode412 chromeos/network/network_configuration_handler.cc:412: network_state_handler_->AddObserver(this, FROM_HERE); On 2017/02/10 19:20:04, tbarzic wrote: > the ...
3 years, 10 months ago (2017-02-10 21:04:18 UTC) #6
tbarzic
https://codereview.chromium.org/2679423008/diff/20001/chromeos/network/network_configuration_handler.cc File chromeos/network/network_configuration_handler.cc (right): https://codereview.chromium.org/2679423008/diff/20001/chromeos/network/network_configuration_handler.cc#newcode404 chromeos/network/network_configuration_handler.cc:404: network_state_handler_->RemoveObserver(this, FROM_HERE); this should probably happen in NetworkStateHandlerObserver::OnShuttingDown (so ...
3 years, 10 months ago (2017-02-10 21:09:54 UTC) #8
stevenjb
https://codereview.chromium.org/2679423008/diff/20001/chromeos/network/network_configuration_handler.cc File chromeos/network/network_configuration_handler.cc (right): https://codereview.chromium.org/2679423008/diff/20001/chromeos/network/network_configuration_handler.cc#newcode404 chromeos/network/network_configuration_handler.cc:404: network_state_handler_->RemoveObserver(this, FROM_HERE); On 2017/02/10 21:09:54, tbarzic wrote: > this ...
3 years, 10 months ago (2017-02-10 22:02:08 UTC) #9
tbarzic
lgtm
3 years, 10 months ago (2017-02-10 22:02:51 UTC) #10
stevenjb
Unfortunately moving RemoveObserver to OnShutdown requires fixing a bunch of tests. PTAL.
3 years, 10 months ago (2017-02-10 22:38:40 UTC) #11
tbarzic
LGTM https://codereview.chromium.org/2679423008/diff/60001/chromeos/network/auto_connect_handler_unittest.cc File chromeos/network/auto_connect_handler_unittest.cc (right): https://codereview.chromium.org/2679423008/diff/60001/chromeos/network/auto_connect_handler_unittest.cc#newcode140 chromeos/network/auto_connect_handler_unittest.cc:140: network_state_handler_->Shutdown(); not strictly part of this cl, but ...
3 years, 10 months ago (2017-02-10 22:47:48 UTC) #12
stevenjb
https://codereview.chromium.org/2679423008/diff/60001/chromeos/network/auto_connect_handler_unittest.cc File chromeos/network/auto_connect_handler_unittest.cc (right): https://codereview.chromium.org/2679423008/diff/60001/chromeos/network/auto_connect_handler_unittest.cc#newcode140 chromeos/network/auto_connect_handler_unittest.cc:140: network_state_handler_->Shutdown(); On 2017/02/10 22:47:48, tbarzic wrote: > not strictly ...
3 years, 10 months ago (2017-02-10 22:50:20 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2679423008/60001
3 years, 10 months ago (2017-02-10 22:51:03 UTC) #15
commit-bot: I haz the power
3 years, 10 months ago (2017-02-10 23:39:55 UTC) #18
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/4be001fc71af06d07cb05c30e4b0...

Powered by Google App Engine
This is Rietveld 408576698