convert mailnews/extensions/smime to Services.jsm

RESOLVED FIXED in Thunderbird 14.0

Status

MailNews Core
Security: S/MIME
--
trivial
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: aceman, Assigned: aceman)

Tracking

(Blocks: 1 bug)

Trunk
Thunderbird 14.0

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

19.48 KB, patch
standard8
: review+
Details | Diff | Splinter Review
(Assignee)

Description

6 years ago
Convert some mailnews/extensions/smime/* calls from Components.classes[*] to Services.jsm:

am-smime.js:  var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
am-smime.js:  var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
am-smime.js:  var windowMediator = Components.classes["@mozilla.org/appshell/window-mediator;1"]
am-smime.js:  var windowMediator = Components.classes["@mozilla.org/appshell/window-mediator;1"]
certFetchingStatus.js:    Components.classes["@mozilla.org/preferences-service;1"]
certFetchingStatus.js:    gLdapServerURL = Components.classes["@mozilla.org/network/io-service;1"]
certFetchingStatus.js:    var windowWatcherSvc = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
msgCompSecurityInfo.js:        Components.classes["@mozilla.org/preferences-service;1"]
msgCompSMIMEOverlay.js:  let promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
msgReadSMIMEOverlay.js:  let promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
(Assignee)

Comment 1

6 years ago
Created attachment 602733 [details] [diff] [review]
patch
Attachment #602733 - Flags: review?(kaie)
(Assignee)

Updated

6 years ago
Status: NEW → ASSIGNED
Comment on attachment 602733 [details] [diff] [review]
patch

This is a simple replacement of services etc, with no functional change, so I can review this as I know kaie is busy.
Attachment #602733 - Flags: review?(kaie) → review?(mbanner)

Comment 3

6 years ago
Comment on attachment 602733 [details] [diff] [review]
patch

Mark, thanks for your offer to review this code, sounds good to me.
Attachment #602733 - Flags: feedback+
(Assignee)

Comment 4

6 years ago
Mark is quite busy too :)
Comment on attachment 602733 [details] [diff] [review]
patch

Review of attachment 602733 [details] [diff] [review]:
-----------------------------------------------------------------

Basically good, but a couple of improvements to be made.

::: mailnews/extensions/smime/content/certFetchingStatus.js
@@ +74,5 @@
>  }
>  
>  function search()
>  {
> +  let prefs = Services.prefs.getBranch(null);

Services.prefs.getBranch(null) is basically equivalent to Services.prefs - hence I think you can drop the .getBranch and inline the local variable.

::: mailnews/extensions/smime/content/msgCompSecurityInfo.js
@@ +154,2 @@
>        var autocompleteLdap = false;
> +      autocompleteLdap = Services.prefs.getBranch(null)

ditto in this file with the .getBranch(null)
Attachment #602733 - Flags: review?(mbanner) → review-
(Assignee)

Comment 6

6 years ago
Thanks, I wasn't sure what is the effect of getBranch(null) so I preserved it.
(Assignee)

Comment 7

6 years ago
Created attachment 608884 [details] [diff] [review]
patch v2
Attachment #602733 - Attachment is obsolete: true
Attachment #608884 - Flags: review?(mbanner)
Attachment #608884 - Flags: review?(mbanner) → review+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
http://hg.mozilla.org/comm-central/rev/01a7a15d27bf
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite?
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 14.0
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.