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

Unified Diff: chrome/common/extensions/api/gcd_private.idl

Issue 468613003: API change to allow sticker authentication for devices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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: chrome/common/extensions/api/gcd_private.idl
diff --git a/chrome/common/extensions/api/gcd_private.idl b/chrome/common/extensions/api/gcd_private.idl
index 918a80d95ccb4cd2710ff0cf134af74b55d7aeba..2f975fd8e84224ea724b754b125682fd8f814cd8 100644
--- a/chrome/common/extensions/api/gcd_private.idl
+++ b/chrome/common/extensions/api/gcd_private.idl
@@ -46,13 +46,25 @@ namespace gcdPrivate {
// Unknown session.
unknownSessionError,
+ // Bad confirmation code. Ask user to retype.
+ badConfirmationCodeError,
+
// Success.
success
};
enum ConfirmationType {
displayCode,
- audio
+ stickerCode
+ };
+
+ // Information regarding the confirmation of a device.
+ dictionary ConfirmationInfo {
+ // Type of confirmation.
+ ConfirmationType type;
+
+ // Code if available.
+ DOMString? code;
};
callback CloudDeviceListCallback = void(GCDDevice[] devices);
@@ -75,12 +87,10 @@ namespace gcdPrivate {
// Called when the confirmation code is available or on error.
// |sessionId| is the session ID (identifies the session for future calls)
// |status| is the status (success or type of error)
- // |code| is the confirmation code or empty on error
- // |confirmationType| is the type of confirmation required
+ // |confirmation| is the information about the confirmation.
callback ConfirmationCodeCallback = void(long sessionId,
Status status,
- DOMString code,
- ConfirmationType type);
+ ConfirmationInfo confirmation);
// Called to indicated the session is established.
// |status| is the status (success or type of error)
@@ -124,8 +134,11 @@ namespace gcdPrivate {
long port,
ConfirmationCodeCallback callback);
- // Confirm that the code is correct. Device will still need to confirm.
+ // Send confirmation code. Device will still need to confirm. |code| must be
+ // present and must match the code from the device, even when the code is
+ // supplied in the |ConfirmationInfo| object.
static void confirmCode(long sessionId,
+ DOMString code,
SessionEstablishedCallback callback);
// Send an encrypted message to the device. |api| is the API path and
« no previous file with comments | « chrome/browser/local_discovery/privetv3_setup_flow.cc ('k') | chrome/test/data/extensions/api_test/gcd_private/api/session.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698