Skip to content

Commit

Permalink
[Passwords] Add addPassword to private API
Browse files Browse the repository at this point in the history
Introduce passwordsPrivate.addPassword API, which will be called from
add password dialog in Desktop Settings.

Bug: 1236053
Change-Id: I3e3d286db9fe4cb563a5176acceb60a763fdd478
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3242642
Reviewed-by: Devlin <[email protected]>
Commit-Queue: Elizabeth Popova <[email protected]>
Cr-Commit-Position: refs/heads/main@{#935126}
NOKEYCHECK=True
GitOrigin-RevId: 06881ba16672f9ffadc12a415495643171cc1aae
  • Loading branch information
Elizabeth Popova authored and copybara-github committed Oct 26, 2021
1 parent a09a838 commit 2b854e0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions closure_compiler/externs/passwords_private.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ chrome.passwordsPrivate.InsecureCredential;
*/
chrome.passwordsPrivate.PasswordCheckStatus;

/**
* @typedef {{
* url: string,
* username: string,
* password: string,
* useAccountStore: boolean
* }}
*/
chrome.passwordsPrivate.AddPasswordOptions;

/**
* Function that logs that the Passwords page was accessed from the Chrome
* Settings WebUI.
Expand Down Expand Up @@ -338,6 +348,16 @@ chrome.passwordsPrivate.getPasswordCheckStatus = function(callback) {};
*/
chrome.passwordsPrivate.getUrlCollection = function(url, callback) {};

/**
* Saves a new password entry described by the given |options|. Invokes
* |callback| or raises an error depending on whether the operation succeeded.
* @param {!chrome.passwordsPrivate.AddPasswordOptions} options Details about a
* new password and storage to be used.
* @param {function(): void=} callback The callback that gets invoked on
* success.
*/
chrome.passwordsPrivate.addPassword = function(options, callback) {};

/**
* Fired when the saved passwords list has changed, meaning that an entry has
* been added or removed.
Expand Down

0 comments on commit 2b854e0

Please sign in to comment.