Closed Bug 1124891 Opened 11 years ago Closed 10 years ago

Telemetry: Record the number of saved credentials for HTTP Auth sites in a profile

Categories

(Toolkit :: Password Manager, defect, P1)

defect
Points:
1

Tracking

()

RESOLVED FIXED
mozilla39
Iteration:
39.1 - 9 Mar
Tracking Status
firefox39 --- fixed

People

(Reporter: ckarlof, Assigned: Paolo)

References

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Paulo, can you take this one?
Flags: needinfo?(paolo.mozmail)
Assignee: nobody → paolo.mozmail
Status: NEW → ASSIGNED
Flags: needinfo?(paolo.mozmail)
Attached patch The patch (obsolete) — Splinter Review
Attachment #8573280 - Flags: review?(MattN+bmo)
Iteration: --- → 39.1 - 9 Mar
Points: --- → 1
Flags: qe-verify+
Flags: firefox-backlog+
Comment on attachment 8573280 [details] [diff] [review] The patch Review of attachment 8573280 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the changes. ::: toolkit/components/passwordmgr/nsLoginManager.js @@ +248,5 @@ > > let logins = this.getAllLogins({}); > > + clearAndGetHistogram("PWMGR_NUM_HTTPAUTH_PASSWORDS").add( > + logins.filter(login => login.httpRealm).length I think we should use the existing API that knows how to filter and doesn't need MP which means we can also move this above the isLoggedIn check: this.countLogins("", null, "") I think your approach also fails for realms that are falsy in JS e.g. "" (not sure if that's valid) so using the existing logic seems better.
Attachment #8573280 - Flags: review?(MattN+bmo) → review+
Attached patch Updated patchSplinter Review
(In reply to Matthew N. [:MattN] from comment #3) > I think we should use the existing API that knows how to filter and doesn't > need MP which means we can also move this above the isLoggedIn check: > this.countLogins("", null, "") Good idea, moved up. > I think your approach also fails for realms that are falsy in JS e.g. "" > (not sure if that's valid) so using the existing logic seems better. That's not valid, and the API enforces this when logins are added. The difference between empty string and null applies only to formSubmitURL (un)fortunately.
Attachment #8573280 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Setting as qe-verify- as this has a test in "toolkit/components/passwordmgr/test/unit/test_telemetry.js". Please set back qe-verify+ if you consider that additional manual testing is also needed here.
Flags: qe-verify+ → qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: