| Index: chrome/common/extensions/api/passwords_private.idl
|
| diff --git a/chrome/common/extensions/api/passwords_private.idl b/chrome/common/extensions/api/passwords_private.idl
|
| index 7dea8b9e6a336bb3f367348ad0a86a6870938490..43855bc43c10ce161ad2068dda72c0f3f117237e 100644
|
| --- a/chrome/common/extensions/api/passwords_private.idl
|
| +++ b/chrome/common/extensions/api/passwords_private.idl
|
| @@ -27,8 +27,16 @@ namespace passwordsPrivate {
|
| DOMString? federationText;
|
| };
|
|
|
| + // Dictionary passed to listeners for the onPlaintextPasswordRetrieved event.
|
| + dictionary PlaintextPasswordEventParameters {
|
| + // The LoginPair associated with the retrieved password.
|
| + LoginPair loginPair;
|
| +
|
| + // The password in plaintext.
|
| + DOMString plaintextPassword;
|
| + };
|
| +
|
| callback CanAccountBeManagedCallback = void(boolean canAccountBeManaged);
|
| - callback PlaintextPasswordCallback = void(DOMString plaintextPassword);
|
|
|
| interface Functions {
|
| // Determines whether account's passwords can be managed via
|
| @@ -53,13 +61,12 @@ namespace passwordsPrivate {
|
|
|
| // Returns the plaintext password corresponding to |loginPair|. Note that on
|
| // some operating systems, this call may result in an OS-level
|
| - // reauthentication.
|
| + // reauthentication. Once the password has been fetched, it will be returned
|
| + // via the onPlaintextPasswordRetrieved event.
|
| //
|
| // |loginPair|: The LoginPair corresponding to the entry whose password
|
| // is to be returned.
|
| - // |callback|: Callback which will be passed the plaintext password.
|
| - static void getPlaintextPassword(
|
| - LoginPair loginPair, PlaintextPasswordCallback callback);
|
| + static void requestPlaintextPassword(LoginPair loginPair);
|
| };
|
|
|
| interface Events {
|
| @@ -72,9 +79,17 @@ namespace passwordsPrivate {
|
|
|
| // Fired when the password exceptions list has changed, meaning that an
|
| // entry has been added or removed. Note that this event fires as soon as a
|
| - // listener is added.
|
| + // listener is added.
|
| //
|
| // |exceptions|: The updated list of password exceptions.
|
| static void onPasswordExceptionsListChanged(DOMString[] exceptions);
|
| +
|
| + // Fired when a plaintext password has been fetched in response to a call to
|
| + // chrome.passwordsPrivate.requestPlaintextPassword().
|
| + //
|
| + // |loginPair|: The LoginPair whose password was found.
|
| + // |plaintextPassword|: The plaintext password which was retrieved.
|
| + static void onPlaintextPasswordRetrieved(
|
| + PlaintextPasswordEventParameters dict);
|
| };
|
| };
|
|
|