Closed Bug 1175300 Opened 9 years ago Closed 9 years ago

Switch password manager to using displayOrigin to display the origin in the capture doorhanger

Categories

(Toolkit :: Password Manager, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla42
Iteration:
42.2 - Jul 27
Tracking Status
firefox42 --- verified

People

(Reporter: MattN, Assigned: rchtara)

References

()

Details

(Whiteboard: pwmgr42)

Attachments

(1 file)

We want to remove the host from the question string and use the existing displayOrigin mechanism to show the origin of the prompt. The string text is still being determinted. See increment 4 at https://people.mozilla.org/~rfeeley/capture-increments/
In bug 1173688 I didn't realize this mechanism already existed (plus I needed that patch on Aurora where there is string freeze), so added a new "origin" option which is basically the same but isn't currently shown. We should remove the new "origin" option documentation and switch the FxA hack to use displayOrigin. I also think displayOrigin should be fixed to be a proper origin, not just the host and let PopupNotifications extract the hostPort from it that way we can handle http/https differently in the future and it's easier to get favicons for a site to display beside the origin.
Assignee: nobody → rchtara
Bug 1175300 - Switch password manager to using displayOrigin to display the origin in the capture doorhanger
Attachment #8633115 - Flags: review?(MattN+bmo)
What should we show in the doorhanger? is it only the host (host)? or the host + the port number if it's explicitly specified in the url (hostname:port)? Should we add the scheme too? thanks
Comment on attachment 8633115 [details] MozReview Request: Bug 1175300 - Switch password manager to using displayOrigin to display the origin in the capture doorhanger Bug 1175300 - Switch password manager to using displayOrigin to display the origin in the capture doorhanger
Iteration: --- → 42.2 - Jul 27
Status: NEW → ASSIGNED
Comment on attachment 8633115 [details] MozReview Request: Bug 1175300 - Switch password manager to using displayOrigin to display the origin in the capture doorhanger Bug 1175300 - Switch password manager to using displayOrigin to display the origin in the capture doorhanger
Attachment #8633115 - Flags: review?(MattN+bmo)
Comment on attachment 8633115 [details] MozReview Request: Bug 1175300 - Switch password manager to using displayOrigin to display the origin in the capture doorhanger https://reviewboard.mozilla.org/r/13187/#review11875 ::: toolkit/modules/PopupNotifications.jsm:571 (Diff revision 3) > - if (n.options.displayOrigin) > - popupnotification.setAttribute("origin", n.options.displayOrigin); > - else > + if (n.options.displayOrigin) { > + try { > + let uri = Services.io.newURI(n.options.displayOrigin, null, null); I think we should rename the argument to displayURI (and update the callers) to pass an nsIURI. The PopupNotifications can do consistent file URI handling and also have enough information to get favicons from the favicon service in the future.
Comment on attachment 8633115 [details] MozReview Request: Bug 1175300 - Switch password manager to using displayOrigin to display the origin in the capture doorhanger Bug 1175300 - Switch password manager to using displayOrigin to display the origin in the capture doorhanger
Attachment #8633115 - Flags: review?(MattN+bmo)
Comment on attachment 8633115 [details] MozReview Request: Bug 1175300 - Switch password manager to using displayOrigin to display the origin in the capture doorhanger https://reviewboard.mozilla.org/r/13187/#review11907 nsBrowserGlue.js also needs to be updated for the new property name ::: browser/base/content/browser-addons.js:49 (Diff revision 4) > var options = { > timeout: Date.now() + 30000 > }; > > - try { > + options.displayURI = installInfo.originatingURI; Fold these together ::: browser/base/content/browser-addons.js:198 (Diff revision 4) > var options = { > timeout: Date.now() + 30000 > }; > > - try { > - options.displayOrigin = installInfo.originatingURI.host; > - } catch (e) { > - // originatingURI might be missing or 'host' might throw for non-nsStandardURL nsIURIs. > - } > > + options.displayURI = installInfo.originatingURI; Ditto ::: toolkit/components/passwordmgr/LoginManagerContent.jsm:7 (Diff revision 4) > this.EXPORTED_SYMBOLS = [ "LoginManagerContent", > + "LoginUtils", > "UserAutoCompleteResult" ]; Revert ::: toolkit/components/passwordmgr/nsLoginManagerPrompter.js:8 (Diff revision 4) > Cu.import("resource://gre/modules/Services.jsm"); > +Cu.import("resource://gre/modules/LoginManagerContent.jsm"); > Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); Revert ::: toolkit/modules/PopupNotifications.jsm:275 (Diff revision 4) > * from. If present, this will be displayed above the message. > * @returns the Notification object corresponding to the added notification. Add a sentence like: If the URI represents a file, the path will be displayed, otherwise the hostPort will be displayed. ::: toolkit/modules/PopupNotifications.jsm:579 (Diff revision 4) > + } catch (e) { > + Cu.reportError(e); > + } We should also do `popupnotification.removeAttribute("origin");` here otherwise we could show the wrong origin (from the last notification). ::: toolkit/modules/PopupNotifications.jsm:576 (Diff revision 4) > + } else if (n.options.displayURI instanceof Ci.nsIStandardURL) { > + uri = n.options.displayURI.hostPort; > + } Just do `} else {` here.
Attachment #8633115 - Flags: review?(MattN+bmo)
Attachment #8633115 - Flags: review?(MattN+bmo)
Comment on attachment 8633115 [details] MozReview Request: Bug 1175300 - Switch password manager to using displayOrigin to display the origin in the capture doorhanger Bug 1175300 - Switch password manager to using displayOrigin to display the origin in the capture doorhanger
Comment on attachment 8633115 [details] MozReview Request: Bug 1175300 - Switch password manager to using displayOrigin to display the origin in the capture doorhanger Bug 1175300 - Switch password manager to using displayOrigin to display the origin in the capture doorhanger
Attachment #8633115 - Flags: review?(MattN+bmo) → review+
Comment on attachment 8633115 [details] MozReview Request: Bug 1175300 - Switch password manager to using displayOrigin to display the origin in the capture doorhanger https://reviewboard.mozilla.org/r/13187/#review11919 Ship It!
Keywords: checkin-needed
Flags: qe-verify+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Whiteboard: pwmgr42
Depends on: 1199805
Verified fixed FF 42b6 Win 7.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: