Chromium Code Reviews| 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..baeea5c76368f6395e768c1c3499e32b087518a4 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 getPlaintextPassword(LoginPair loginPair); |
|
stevenjb
2015/05/29 23:17:02
nit: We should probably rename this 'requestPlaint
Kyle Horimoto
2015/06/01 19:14:45
Done.
|
| }; |
| 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.getPlaintextPassword(). |
| + // |
| + // |loginPair|: The LoginPair whose password was found. |
| + // |plaintextPassword|: The plaintext password which was retrieved. |
| + static void onPlaintextPasswordRetrieved( |
| + PlaintextPasswordEventParameters dict); |
| }; |
| }; |