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

Unified Diff: chromeos/network/network_connection_handler.h

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
« no previous file with comments | « chromeos/network/network_connect_unittest.cc ('k') | chromeos/network/network_connection_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chromeos/network/network_connect_unittest.cc ('k') | chromeos/network/network_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698