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

Unified Diff: chrome/browser/chromeos/tether/tether_service.cc

Issue 2975483002: [CrOS Tether] Disconnect cleanly from active Tether networks when the user logs out or the Tether c… (Closed)
Patch Set: hansberry@ comment. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/tether/tether_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/tether/tether_service.cc
diff --git a/chrome/browser/chromeos/tether/tether_service.cc b/chrome/browser/chromeos/tether/tether_service.cc
index f7f9c8d974f453ac824aa4f55d42ca4894e50284..67a26ad9384a75ce9c75467456dd2f0315ee20a0 100644
--- a/chrome/browser/chromeos/tether/tether_service.cc
+++ b/chrome/browser/chromeos/tether/tether_service.cc
@@ -135,6 +135,8 @@ void TetherService::Shutdown() {
shut_down_ = true;
+ // Remove all observers. This ensures that once Shutdown() is called, no more
+ // calls to UpdateTetherTechnologyState() will be triggered.
power_manager_client_->RemoveObserver(this);
session_manager_client_->RemoveObserver(this);
cryptauth_service_->GetCryptAuthDeviceManager()->RemoveObserver(this);
@@ -143,7 +145,10 @@ void TetherService::Shutdown() {
adapter_->RemoveObserver(this);
registrar_.RemoveAll();
- UpdateTetherTechnologyState();
+ // Shut down the feature. Note that this does not change Tether's technology
+ // state in NetworkStateHandler because doing so could cause visual jank just
+ // as the user logs out.
+ StopTether();
}
void TetherService::SuspendImminent() {
« no previous file with comments | « no previous file | chrome/browser/chromeos/tether/tether_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698