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

Side by Side Diff: chrome/common/extensions/api/passwords_private.idl

Issue 2651663003: Show human readable origin for Android apps (Closed)
Patch Set: Fix tests and nits Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Use the <code>chrome.passwordsPrivate</code> API to add or remove password 5 // Use the <code>chrome.passwordsPrivate</code> API to add or remove password
6 // data from the settings UI. 6 // data from the settings UI.
7 namespace passwordsPrivate { 7 namespace passwordsPrivate {
8 // Pair of origin URL and login saved for that URL. 8 dictionary UrlCollection {
9 // The fully specified URL of the credential's origin.
10 DOMString origin;
11
12 // A human readable version of the URL of the credential's origin.
13 DOMString shown;
14
15 // The URL that will be linked to when an entry is clicked.
16 DOMString link;
17 };
18
19 // Pair of a URL collection and a username saved for these URLs.
9 dictionary LoginPair { 20 dictionary LoginPair {
10 // The human-readable origin for the URL where the password is used. 21 UrlCollection urls;
11 DOMString originUrl;
12 22
13 // The username used in conjunction with the saved password. 23 // The username used in conjunction with the saved password.
14 DOMString username; 24 DOMString username;
15 }; 25 };
16 26
17 // Entry used to display a password in the settings UI. 27 // Entry used to display a password in the settings UI.
18 dictionary PasswordUiEntry { 28 dictionary PasswordUiEntry {
19 // The login information for this entry. 29 // The login information for this entry.
20 LoginPair loginPair; 30 LoginPair loginPair;
21 31
22 // The complete URL of the page that the password is saved for.
23 DOMString linkUrl;
24
25 // The number of characters in the password; used to display placeholder 32 // The number of characters in the password; used to display placeholder
26 // dots in the UI. 33 // dots in the UI.
27 long numCharactersInPassword; 34 long numCharactersInPassword;
28 35
29 // Text shown if the password was obtained via a federated identity. 36 // Text shown if the password was obtained via a federated identity.
30 DOMString? federationText; 37 DOMString? federationText;
31 }; 38 };
32 39
33 dictionary ExceptionPair {
34 // The human-readable URL where passwords will not be saved.
35 DOMString exceptionUrl;
36
37 // The complete URL of the page that the exception was created for.
38 DOMString linkUrl;
39 };
40
41 // Dictionary passed to listeners for the onPlaintextPasswordRetrieved event. 40 // Dictionary passed to listeners for the onPlaintextPasswordRetrieved event.
42 dictionary PlaintextPasswordEventParameters { 41 dictionary PlaintextPasswordEventParameters {
43 // The LoginPair associated with the retrieved password. 42 // The LoginPair associated with the retrieved password.
44 LoginPair loginPair; 43 LoginPair loginPair;
45 44
46 // The password in plaintext. 45 // The password in plaintext.
47 DOMString plaintextPassword; 46 DOMString plaintextPassword;
48 }; 47 };
49 48
49 dictionary ExceptionEntry {
50 UrlCollection urls;
51 };
52
50 callback PasswordListCallback = void(PasswordUiEntry[] entries); 53 callback PasswordListCallback = void(PasswordUiEntry[] entries);
51 callback ExceptionListCallback = void(ExceptionPair[] exceptions); 54 callback ExceptionListCallback = void(ExceptionEntry[] exceptions);
52 55
53 interface Functions { 56 interface Functions {
54 // Removes the saved password corresponding to |loginPair|. If no saved 57 // Removes the saved password corresponding to |loginPair|. If no saved
55 // password for this pair exists, this function is a no-op. 58 // password for this pair exists, this function is a no-op.
56 // 59 //
57 // |loginPair|: The LoginPair corresponding to the entry to remove. 60 // |loginPair|: The LoginPair corresponding to the entry to remove.
58 static void removeSavedPassword(LoginPair loginPair); 61 static void removeSavedPassword(LoginPair loginPair);
59 62
60 // Removes the saved password exception corresponding to |exceptionUrl|. If 63 // Removes the saved password exception corresponding to |exceptionUrl|. If
61 // no exception with this URL exists, this function is a no-op. 64 // no exception with this URL exists, this function is a no-op.
(...skipping 24 matching lines...) Expand all
86 // Fired when the saved passwords list has changed, meaning that an entry 89 // Fired when the saved passwords list has changed, meaning that an entry
87 // has been added or removed. 90 // has been added or removed.
88 // 91 //
89 // |entries|: The updated list of password entries. 92 // |entries|: The updated list of password entries.
90 static void onSavedPasswordsListChanged(PasswordUiEntry[] entries); 93 static void onSavedPasswordsListChanged(PasswordUiEntry[] entries);
91 94
92 // Fired when the password exceptions list has changed, meaning that an 95 // Fired when the password exceptions list has changed, meaning that an
93 // entry has been added or removed. 96 // entry has been added or removed.
94 // 97 //
95 // |exceptions|: The updated list of password exceptions. 98 // |exceptions|: The updated list of password exceptions.
96 static void onPasswordExceptionsListChanged(ExceptionPair[] exceptions); 99 static void onPasswordExceptionsListChanged(ExceptionEntry[] exceptions);
97 100
98 // Fired when a plaintext password has been fetched in response to a call to 101 // Fired when a plaintext password has been fetched in response to a call to
99 // chrome.passwordsPrivate.requestPlaintextPassword(). 102 // chrome.passwordsPrivate.requestPlaintextPassword().
100 // 103 //
101 // |loginPair|: The LoginPair whose password was found. 104 // |loginPair|: The LoginPair whose password was found.
102 // |plaintextPassword|: The plaintext password which was retrieved. 105 // |plaintextPassword|: The plaintext password which was retrieved.
103 static void onPlaintextPasswordRetrieved( 106 static void onPlaintextPasswordRetrieved(
104 PlaintextPasswordEventParameters dict); 107 PlaintextPasswordEventParameters dict);
105 }; 108 };
106 }; 109 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698