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

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

Issue 1142693003: Implement the chrome.passwordsPrivate API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stevenjb comment. Created 5 years, 6 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 | « chrome/chrome_tests.gypi ('k') | chrome/test/data/extensions/api_test/passwords_private/main.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
};
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/extensions/api_test/passwords_private/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698