Closed
Bug 1145789
Opened 10 years ago
Closed 10 years ago
Unify code paths for the password save and change notifications
Categories
(Toolkit :: Password Manager, defect)
Toolkit
Password Manager
Tracking
()
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: Paolo, Assigned: Paolo)
References
Details
Attachments
(1 file, 1 obsolete file)
12.64 KB,
patch
|
Details | Diff | Splinter Review |
This is preliminary work to be able to edit the username inside the password popup notification.
Assignee | ||
Comment 1•10 years ago
|
||
Assignee: nobody → paolo.mozmail
Status: NEW → ASSIGNED
Attachment #8580888 -
Flags: review?(MattN+bmo)
Assignee | ||
Updated•10 years ago
|
Iteration: --- → 39.2 - 23 Mar
Points: --- → 1
Flags: firefox-backlog+
Assignee | ||
Updated•10 years ago
|
Flags: qe-verify-
Comment 2•10 years ago
|
||
Comment on attachment 8580888 [details] [diff] [review]
The patch
Review of attachment 8580888 [details] [diff] [review]:
-----------------------------------------------------------------
This refactoring should be covered by existing tests but I would recommend running them in case the change in callback behaviour (where the current storage state is taken into account) breaks one of them unintentionally.
::: toolkit/components/passwordmgr/nsLoginManagerPrompter.js
@@ +783,5 @@
> + * _showLoginDoorhanger
> + *
> + * Displays the PopupNotifications.jsm doorhanger for password save or change.
> + */
> + _showLoginDoorhanger(login, type) {
Could you document the arguments (especially `type`), adding another "*" for JSDoc and removing the redundant method name line? I've been trying to cleanup the existing JSDoc comments as I touch them.
I kind of wonder if the method name should be more specific (e.g. indicating these are capture doorhangers, not fill ones) which will be implemented later in a different function I imagine.
@@ +784,5 @@
> + *
> + * Displays the PopupNotifications.jsm doorhanger for password save or change.
> + */
> + _showLoginDoorhanger(login, type) {
> + var { browser } = this._getNotifyWindow();
Nit: `let` is the new `var`
@@ +815,5 @@
> + let logins = foundLogins.filter(l => l.username == login.username);
> + if (logins.length == 0) {
> + Services.logins.addLogin(login);
> + } else if (logins.length == 1) {
> + this._updateLogin(logins[0], login.password);
So we're not checking `type` here since we're going to allow editing of the captured fields in the doorhanger soon which can affect whether we do an add or update. I think it's fine to have a possible mismatch between the button label and the storage action in the meantime since as you said in-person, there can be dataloss in either direction (before or after the change) if the user modifies storage after the doorhanger appears.
@@ +850,5 @@
> + persistWhileVisible: true,
> + passwordNotificationType: type,
> + eventCallback: function (topic) {
> + if (topic != "showing") {
> + return false;
Nit: this function does not always return a value. Feel free to ignore if you're not confident fixing this existing problem.
Attachment #8580888 -
Flags: review?(MattN+bmo) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8580888 -
Attachment is obsolete: true
Assignee | ||
Comment 4•10 years ago
|
||
Fixed the case where we show the popup for HTTP authentication:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c5a274c0133d
Assignee | ||
Comment 5•10 years ago
|
||
Updated•10 years ago
|
Iteration: 39.2 - 23 Mar → 39.3 - 30 Mar
Comment 6•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Updated•10 years ago
|
Blocks: 2015-login-capture-UX
Updated•10 years ago
|
No longer blocks: passwords-2015-UX
You need to log in
before you can comment on or make changes to this bug.
Description
•