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

Unified Diff: chromeos/network/network_connection_handler_impl.cc

Issue 2858943003: [CrOS Tether] Add disconnect handling to NetworkConnectionHandler::TetherDelegate. (Closed)
Patch Set: Rebased. Created 3 years, 7 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
Index: chromeos/network/network_connection_handler_impl.cc
diff --git a/chromeos/network/network_connection_handler_impl.cc b/chromeos/network/network_connection_handler_impl.cc
index fb4f3201a7ffff4117570090fdef29d70afaf983..2dc84d249479a0a562891e4246298814ba09f9c5 100644
--- a/chromeos/network/network_connection_handler_impl.cc
+++ b/chromeos/network/network_connection_handler_impl.cc
@@ -241,7 +241,7 @@ void NetworkConnectionHandlerImpl::ConnectToNetwork(
error_callback);
} else {
InvokeConnectErrorCallback(service_path, error_callback,
- kErrorTetherConnectionAttemptWithNoDelegate);
+ kErrorTetherAttemptWithNoDelegate);
}
return;
}
@@ -305,6 +305,18 @@ void NetworkConnectionHandlerImpl::DisconnectNetwork(
kErrorNotConnected, "");
return;
}
+ if (NetworkTypePattern::Tether().MatchesType(network->type())) {
+ if (tether_delegate_) {
+ const std::string& tether_network_guid = network->guid();
+ DCHECK(!tether_network_guid.empty());
+ InitiateTetherNetworkDisconnection(tether_network_guid, success_callback,
+ error_callback);
+ } else {
+ InvokeConnectErrorCallback(service_path, error_callback,
+ kErrorTetherAttemptWithNoDelegate);
+ }
+ return;
+ }
pending_requests_.erase(service_path);
CallShillDisconnect(service_path, success_callback, error_callback);
}
« no previous file with comments | « chromeos/network/network_connection_handler.cc ('k') | chromeos/network/network_connection_handler_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698