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 58e03e5fcbaee6e02175367f224c411822d82dbd..aef459386b5444c6c17183fc1e1bdc3fc858b628 100644 |
| --- a/chrome/common/extensions/api/passwords_private.idl |
| +++ b/chrome/common/extensions/api/passwords_private.idl |
| @@ -5,11 +5,21 @@ |
| // Use the <code>chrome.passwordsPrivate</code> API to add or remove password |
| // data from the settings UI. |
| namespace passwordsPrivate { |
| - // Pair of origin URL and login saved for that URL. |
| - dictionary LoginPair { |
| - // The human-readable origin for the URL where the password is used. |
| + dictionary UrlCollection { |
|
hcarmona
2017/04/21 17:52:19
Can we drop the Url from these data members?
dict
jdoerrie
2017/04/21 20:08:25
Done.
|
| + // The fully specified URL of the credential's origin. |
| DOMString originUrl; |
| + // A human readable version of the URL of the credential's origin. |
| + DOMString shownUrl; |
| + |
| + // The URL that will be linked to when an entry is clicked. |
| + DOMString linkUrl; |
| + }; |
| + |
| + // Pair of a URL collection and a username saved for these URLs. |
| + dictionary LoginPair { |
| + UrlCollection urls; |
| + |
| // The username used in conjunction with the saved password. |
| DOMString username; |
| }; |
| @@ -19,9 +29,6 @@ namespace passwordsPrivate { |
| // The login information for this entry. |
| LoginPair loginPair; |
| - // The complete URL of the page that the password is saved for. |
| - DOMString linkUrl; |
| - |
| // The number of characters in the password; used to display placeholder |
| // dots in the UI. |
| long numCharactersInPassword; |
| @@ -30,14 +37,6 @@ namespace passwordsPrivate { |
| DOMString? federationText; |
| }; |
| - dictionary ExceptionPair { |
| - // The human-readable URL where passwords will not be saved. |
| - DOMString exceptionUrl; |
| - |
| - // The complete URL of the page that the exception was created for. |
| - DOMString linkUrl; |
| - }; |
| - |
| // Dictionary passed to listeners for the onPlaintextPasswordRetrieved event. |
| dictionary PlaintextPasswordEventParameters { |
| // The LoginPair associated with the retrieved password. |
| @@ -47,8 +46,12 @@ namespace passwordsPrivate { |
| DOMString plaintextPassword; |
| }; |
| + dictionary ExceptionEntry { |
| + UrlCollection urls; |
| + }; |
| + |
| callback PasswordListCallback = void(PasswordUiEntry[] entries); |
| - callback ExceptionListCallback = void(ExceptionPair[] exceptions); |
| + callback ExceptionListCallback = void(ExceptionEntry[] exceptions); |
|
hcarmona
2017/04/21 17:52:19
Can we use the |UrlCollection| directly and remove
jdoerrie
2017/04/21 18:48:49
Yeah, I thought about doing this but wanted to som
hcarmona
2017/04/21 19:07:55
Keeping ExceptionEntry for readability as is sound
jdoerrie
2017/04/21 20:08:25
Acknowledged.
|
| interface Functions { |
| // Removes the saved password corresponding to |loginPair|. If no saved |
| @@ -93,7 +96,7 @@ namespace passwordsPrivate { |
| // entry has been added or removed. |
| // |
| // |exceptions|: The updated list of password exceptions. |
| - static void onPasswordExceptionsListChanged(ExceptionPair[] exceptions); |
| + static void onPasswordExceptionsListChanged(ExceptionEntry[] exceptions); |
| // Fired when a plaintext password has been fetched in response to a call to |
| // chrome.passwordsPrivate.requestPlaintextPassword(). |