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

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

Issue 2792483002: [CrOS Tether] Create TetherConnector, which attempts to connect to a nearby tether host. (Closed)
Patch Set: hansberry@ comment. 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/connect_tethering_operation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/components/tether/connect_tethering_operation.h
diff --git a/chromeos/components/tether/connect_tethering_operation.h b/chromeos/components/tether/connect_tethering_operation.h
index d7135b9cda77c4e538a8e8849f2ebd158b53c08b..fdcc22626e865a47dce7e83110dce3547b400f88 100644
--- a/chromeos/components/tether/connect_tethering_operation.h
+++ b/chromeos/components/tether/connect_tethering_operation.h
@@ -50,9 +50,11 @@ class ConnectTetheringOperation : public MessageTransferOperation {
class Observer {
public:
virtual void OnSuccessfulConnectTetheringResponse(
+ const cryptauth::RemoteDevice& remote_device,
const std::string& ssid,
const std::string& password) = 0;
virtual void OnConnectTetheringFailure(
+ const cryptauth::RemoteDevice& remote_device,
ConnectTetheringResponse_ResponseCode error_code) = 0;
};
@@ -73,17 +75,23 @@ class ConnectTetheringOperation : public MessageTransferOperation {
const cryptauth::RemoteDevice& remote_device) override;
void OnOperationFinished() override;
MessageType GetMessageTypeForConnection() override;
-
- private:
- friend class ConnectTetheringOperationTest;
-
void NotifyObserversOfSuccessfulResponse(const std::string& ssid,
const std::string& password);
void NotifyObserversOfConnectionFailure(
ConnectTetheringResponse_ResponseCode error_code);
+ private:
+ friend class ConnectTetheringOperationTest;
+
+ cryptauth::RemoteDevice remote_device_;
HostScanDevicePrioritizer* host_scan_device_prioritizer_;
- bool has_authenticated_;
+
+ // These values are saved in OnMessageReceived() and returned in
+ // OnOperationFinished().
+ std::string ssid_to_return_;
+ std::string password_to_return_;
+ ConnectTetheringResponse_ResponseCode error_code_to_return_;
Jeremy Klein 2017/04/06 21:04:15 nit: I'd call this response_code_to_return to matc
Kyle Horimoto 2017/04/06 21:33:52 I'd like to keep it as is. We only use that variab
+
base::ObserverList<Observer> observer_list_;
DISALLOW_COPY_AND_ASSIGN(ConnectTetheringOperation);
« no previous file with comments | « chromeos/components/tether/BUILD.gn ('k') | chromeos/components/tether/connect_tethering_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698