Index: chromeos/network/network_connection_handler.h |
diff --git a/chromeos/network/network_connection_handler.h b/chromeos/network/network_connection_handler.h |
index 875ee00c1c53182fef8219729c27f00dec752f5e..625964a85272dfe89364da697f68da1a358ffe2d 100644 |
--- a/chromeos/network/network_connection_handler.h |
+++ b/chromeos/network/network_connection_handler.h |
@@ -74,7 +74,7 @@ class CHROMEOS_EXPORT NetworkConnectionHandler { |
// connecting. |
static const char kErrorConnectFailed[]; |
- // An unexpected DBus or Shill error occurred while disconnecting. |
+ // An unexpected DBus, Shill, or Tether error occurred while disconnecting. |
static const char kErrorDisconnectFailed[]; |
// A new network connect request canceled this one. |
@@ -95,8 +95,9 @@ class CHROMEOS_EXPORT NetworkConnectionHandler { |
// Network was enabled/disabled when it was not available. |
static const char kErrorEnabledOrDisabledWhenNotAvailable[]; |
- // Connection to Tether network attempted when no tether delegate present. |
- static const char kErrorTetherConnectionAttemptWithNoDelegate[]; |
+ // Connection or disconnection to Tether network attempted when no tether |
+ // delegate present. |
+ static const char kErrorTetherAttemptWithNoDelegate[]; |
class CHROMEOS_EXPORT TetherDelegate { |
public: |
@@ -108,6 +109,14 @@ class CHROMEOS_EXPORT NetworkConnectionHandler { |
const base::Closure& success_callback, |
const network_handler::StringResultCallback& error_callback) = 0; |
+ // Disconnects from the Tether network with GUID |tether_network_guid|. On |
+ // success, invokes |success_callback|, and on failure, invokes |
+ // |error_callback|, passing the relevant error code declared above. |
+ virtual void DisconnectFromNetwork( |
+ const std::string& tether_network_guid, |
+ const base::Closure& success_callback, |
+ const network_handler::StringResultCallback& error_callback) = 0; |
+ |
protected: |
virtual ~TetherDelegate() {} |
}; |
@@ -179,6 +188,12 @@ class CHROMEOS_EXPORT NetworkConnectionHandler { |
const base::Closure& success_callback, |
const network_handler::ErrorCallback& error_callback); |
+ // Initiates a disconnection from a Tether network. |
+ void InitiateTetherNetworkDisconnection( |
+ const std::string& tether_network_guid, |
+ const base::Closure& success_callback, |
+ const network_handler::ErrorCallback& error_callback); |
+ |
base::ObserverList<NetworkConnectionObserver, true> observers_; |
// Delegate used to start a connection to a tether network. |