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

Unified Diff: chromeos/components/tether/disconnect_tethering_operation.h

Issue 2857853005: [CrOS Tether] Create TetherDisconnector, which disconnects from active tethering sessions. (Closed)
Patch Set: hansberry@ comments. Created 3 years, 8 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/components/tether/BUILD.gn ('k') | chromeos/components/tether/disconnect_tethering_operation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/components/tether/disconnect_tethering_operation.h
diff --git a/chromeos/components/tether/disconnect_tethering_operation.h b/chromeos/components/tether/disconnect_tethering_operation.h
index 81e1e65e7f4c976d6e554a95f9c0753eac6185b5..0a72b47da6d56f16ca20dc02887ddc0cb7201005 100644
--- a/chromeos/components/tether/disconnect_tethering_operation.h
+++ b/chromeos/components/tether/disconnect_tethering_operation.h
@@ -36,9 +36,11 @@ class DisconnectTetheringOperation : public MessageTransferOperation {
class Observer {
public:
- // Alerts observers when the operation has finished. |success| is true when
- // the operation successfully sends the message and false otherwise.
- virtual void OnOperationFinished(bool success) = 0;
+ // Alerts observers when the operation has finished for device with ID
+ // |device_id|. |success| is true when the operation successfully sends the
+ // message and false otherwise.
+ virtual void OnOperationFinished(const std::string& device_id,
+ bool success) = 0;
};
DisconnectTetheringOperation(const cryptauth::RemoteDevice& device_to_connect,
@@ -49,6 +51,8 @@ class DisconnectTetheringOperation : public MessageTransferOperation {
void RemoveObserver(Observer* observer);
protected:
+ void NotifyObserversOperationFinished(bool success);
+
// MessageTransferOperation:
void OnDeviceAuthenticated(
const cryptauth::RemoteDevice& remote_device) override;
@@ -59,6 +63,7 @@ class DisconnectTetheringOperation : public MessageTransferOperation {
friend class DisconnectTetheringOperationTest;
base::ObserverList<Observer> observer_list_;
+ std::string device_id_;
bool has_authenticated_;
DISALLOW_COPY_AND_ASSIGN(DisconnectTetheringOperation);
« no previous file with comments | « chromeos/components/tether/BUILD.gn ('k') | chromeos/components/tether/disconnect_tethering_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698