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

Unified Diff: components/proximity_auth/webui/proximity_auth_webui_handler.h

Issue 1356943004: Add RemoteDeviceLoader to create RemoteDevice from CryptAuth data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webui
Patch Set: move RemoteDevice creation in tests to util function Created 5 years, 3 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: components/proximity_auth/webui/proximity_auth_webui_handler.h
diff --git a/components/proximity_auth/webui/proximity_auth_webui_handler.h b/components/proximity_auth/webui/proximity_auth_webui_handler.h
index ae7b57d42a2bfd8a87cf61c2091ad99fc6bb8c77..ee79c0bb1a913ce4734f405656a4161cff9a2695 100644
--- a/components/proximity_auth/webui/proximity_auth_webui_handler.h
+++ b/components/proximity_auth/webui/proximity_auth_webui_handler.h
@@ -31,8 +31,8 @@ namespace proximity_auth {
class ReachablePhoneFlow;
class RemoteDeviceLifeCycle;
+class RemoteDeviceLoader;
struct RemoteStatusUpdate;
-class SecureContext;
// Handles messages from the chrome://proximity-auth page.
class ProximityAuthWebUIHandler : public content::WebUIMessageHandler,
@@ -96,9 +96,8 @@ class ProximityAuthWebUIHandler : public content::WebUIMessageHandler,
void OnReachablePhonesFound(
const std::vector<cryptauth::ExternalDeviceInfo>& reachable_phones);
- // Called when the key agreement of PSK of the remote device completes.
- void OnPSKDerived(const cryptauth::ExternalDeviceInfo& unlock_key,
- const std::string& persistent_symmetric_key);
+ // Called when the RemoteDevice is loaded so we can create a connection.
+ void OnRemoteDevicesLoaded(const std::vector<RemoteDevice>& remote_devices);
// Converts an ExternalDeviceInfo proto to a JSON dictionary used in
// JavaScript.
@@ -146,7 +145,7 @@ class ProximityAuthWebUIHandler : public content::WebUIMessageHandler,
// Member variables for connecting to and authenticating the remote device.
// TODO(tengs): Support multiple simultaenous connections.
- scoped_ptr<SecureMessageDelegate> secure_message_delegate_;
+ scoped_ptr<RemoteDeviceLoader> remote_device_loader_;
RemoteDevice selected_remote_device_;
scoped_ptr<RemoteDeviceLifeCycle> life_cycle_;
scoped_ptr<RemoteStatusUpdate> last_remote_status_update_;

Powered by Google App Engine
This is Rietveld 408576698