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

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

Issue 1892613006: Add functions to the passwords private api that update the lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 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 // Pair of origin URL and login saved for that URL.
9 dictionary LoginPair { 9 dictionary LoginPair {
10 // The human-readable origin for the URL where the password is used. 10 // The human-readable origin for the URL where the password is used.
(...skipping 21 matching lines...) Expand all
32 32
33 // Dictionary passed to listeners for the onPlaintextPasswordRetrieved event. 33 // Dictionary passed to listeners for the onPlaintextPasswordRetrieved event.
34 dictionary PlaintextPasswordEventParameters { 34 dictionary PlaintextPasswordEventParameters {
35 // The LoginPair associated with the retrieved password. 35 // The LoginPair associated with the retrieved password.
36 LoginPair loginPair; 36 LoginPair loginPair;
37 37
38 // The password in plaintext. 38 // The password in plaintext.
39 DOMString plaintextPassword; 39 DOMString plaintextPassword;
40 }; 40 };
41 41
42 callback PasswordListCallback = void(PasswordUiEntry[] entries);
43 callback ExceptionListCallback = void(DOMString[] exceptions);
44
42 interface Functions { 45 interface Functions {
43 // Removes the saved password corresponding to |loginPair|. If no saved 46 // Removes the saved password corresponding to |loginPair|. If no saved
44 // password for this pair exists, this function is a no-op. 47 // password for this pair exists, this function is a no-op.
45 // 48 //
46 // |loginPair|: The LoginPair corresponding to the entry to remove. 49 // |loginPair|: The LoginPair corresponding to the entry to remove.
47 static void removeSavedPassword(LoginPair loginPair); 50 static void removeSavedPassword(LoginPair loginPair);
48 51
49 // Removes the saved password exception corresponding to |exceptionUrl|. If 52 // Removes the saved password exception corresponding to |exceptionUrl|. If
50 // no exception with this URL exists, this function is a no-op. 53 // no exception with this URL exists, this function is a no-op.
51 // 54 //
52 // |exceptionUrl|: The URL corresponding to the exception to remove. 55 // |exceptionUrl|: The URL corresponding to the exception to remove.
53 static void removePasswordException(DOMString exceptionUrl); 56 static void removePasswordException(DOMString exceptionUrl);
54 57
55 // Returns the plaintext password corresponding to |loginPair|. Note that on 58 // Returns the plaintext password corresponding to |loginPair|. Note that on
56 // some operating systems, this call may result in an OS-level 59 // some operating systems, this call may result in an OS-level
57 // reauthentication. Once the password has been fetched, it will be returned 60 // reauthentication. Once the password has been fetched, it will be returned
58 // via the onPlaintextPasswordRetrieved event. 61 // via the onPlaintextPasswordRetrieved event.
62 // TODO(hcarmona): Investigate using a callback for consistency.
59 // 63 //
60 // |loginPair|: The LoginPair corresponding to the entry whose password 64 // |loginPair|: The LoginPair corresponding to the entry whose password
61 // is to be returned. 65 // is to be returned.
62 static void requestPlaintextPassword(LoginPair loginPair); 66 static void requestPlaintextPassword(LoginPair loginPair);
67
68 // Returns the list of saved passwords.
69 // |callback|: Called with the list of saved passwords.
70 static void getSavedPasswordList(PasswordListCallback callback);
71
72 // Returns the list of password exceptions.
73 // |callback|: Called with the list of password exceptions.
74 static void getPasswordExceptionList(ExceptionListCallback callback);
63 }; 75 };
64 76
65 interface Events { 77 interface Events {
66 // Fired when the saved passwords list has changed, meaning that an entry 78 // Fired when the saved passwords list has changed, meaning that an entry
67 // has been added or removed. Note that this event fires as soon as a 79 // has been added or removed. Note that this event fires as soon as a
68 // listener is added. 80 // listener is added.
69 // 81 //
70 // |entries|: The updated list of password entries. 82 // |entries|: The updated list of password entries.
71 static void onSavedPasswordsListChanged(PasswordUiEntry[] entries); 83 static void onSavedPasswordsListChanged(PasswordUiEntry[] entries);
72 84
73 // Fired when the password exceptions list has changed, meaning that an 85 // Fired when the password exceptions list has changed, meaning that an
74 // entry has been added or removed. Note that this event fires as soon as a 86 // entry has been added or removed. Note that this event fires as soon as a
75 // listener is added. 87 // listener is added.
76 // 88 //
77 // |exceptions|: The updated list of password exceptions. 89 // |exceptions|: The updated list of password exceptions.
78 static void onPasswordExceptionsListChanged(DOMString[] exceptions); 90 static void onPasswordExceptionsListChanged(DOMString[] exceptions);
79 91
80 // Fired when a plaintext password has been fetched in response to a call to 92 // Fired when a plaintext password has been fetched in response to a call to
81 // chrome.passwordsPrivate.requestPlaintextPassword(). 93 // chrome.passwordsPrivate.requestPlaintextPassword().
82 // 94 //
83 // |loginPair|: The LoginPair whose password was found. 95 // |loginPair|: The LoginPair whose password was found.
84 // |plaintextPassword|: The plaintext password which was retrieved. 96 // |plaintextPassword|: The plaintext password which was retrieved.
85 static void onPlaintextPasswordRetrieved( 97 static void onPlaintextPasswordRetrieved(
86 PlaintextPasswordEventParameters dict); 98 PlaintextPasswordEventParameters dict);
87 }; 99 };
88 }; 100 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698