Closed Bug 732807 Opened 12 years ago Closed 12 years ago

convert mailnews/extensions/smime to Services.jsm

Categories

(MailNews Core :: Security: S/MIME, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 14.0

People

(Reporter: aceman, Assigned: aceman)

References

Details

Attachments

(1 file, 1 obsolete file)

19.48 KB, patch
standard8
: review+
Details | Diff | Splinter Review
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"]
Attached patch patch (obsolete) — Splinter Review
Attachment #602733 - Flags: review?(kaie)
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 on attachment 602733 [details] [diff] [review]
patch

Mark, thanks for your offer to review this code, sounds good to me.
Attachment #602733 - Flags: feedback+
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-
Thanks, I wasn't sure what is the effect of getBranch(null) so I preserved it.
Attached patch patch v2Splinter Review
Attachment #602733 - Attachment is obsolete: true
Attachment #608884 - Flags: review?(mbanner)
Attachment #608884 - Flags: review?(mbanner) → review+
Keywords: checkin-needed
http://hg.mozilla.org/comm-central/rev/01a7a15d27bf
Status: ASSIGNED → RESOLVED
Closed: 12 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.

Attachment

General

Creator:
Created:
Updated:
Size: