diff options
author | Moonchild <git-repo@palemoon.org> | 2020-03-11 11:49:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-11 11:49:30 +0100 |
commit | e8275b9a1e638e37953b949c879e04cc0f0387bb (patch) | |
tree | f19bb2ef97b2f5eebdcfca31cddac5c2a315c1be /netwerk | |
parent | ccee9ea5b7167675290c022e75b1744d41c005d2 (diff) | |
parent | ad7526fe70d2111c2d0cd2552b49922c09cf84c2 (diff) | |
download | UXP-e8275b9a1e638e37953b949c879e04cc0f0387bb.tar UXP-e8275b9a1e638e37953b949c879e04cc0f0387bb.tar.gz UXP-e8275b9a1e638e37953b949c879e04cc0f0387bb.tar.lz UXP-e8275b9a1e638e37953b949c879e04cc0f0387bb.tar.xz UXP-e8275b9a1e638e37953b949c879e04cc0f0387bb.zip |
Merge pull request #1479 from JustOff/PR_uau_cleanup
Remove no longer used function and modules from UserAgentUpdates.jsm
Diffstat (limited to 'netwerk')
-rw-r--r-- | netwerk/protocol/http/UserAgentUpdates.jsm | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/netwerk/protocol/http/UserAgentUpdates.jsm b/netwerk/protocol/http/UserAgentUpdates.jsm index 4b3ae574a..cd21b78b3 100644 --- a/netwerk/protocol/http/UserAgentUpdates.jsm +++ b/netwerk/protocol/http/UserAgentUpdates.jsm @@ -17,15 +17,9 @@ XPCOMUtils.defineLazyModuleGetter( this, "FileUtils", "resource://gre/modules/FileUtils.jsm"); XPCOMUtils.defineLazyModuleGetter( - this, "NetUtil", "resource://gre/modules/NetUtil.jsm"); - -XPCOMUtils.defineLazyModuleGetter( this, "OS", "resource://gre/modules/osfile.jsm"); XPCOMUtils.defineLazyModuleGetter( - this, "Promise", "resource://gre/modules/Promise.jsm"); - -XPCOMUtils.defineLazyModuleGetter( this, "UpdateUtils", "resource://gre/modules/UpdateUtils.jsm"); XPCOMUtils.defineLazyServiceGetter( @@ -64,30 +58,6 @@ const PREF_APP_DISTRIBUTION_VERSION = "distribution.version"; var gInitialized = false; -function readChannel(url) { - return new Promise((resolve, reject) => { - try { - let channel = NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true}); - channel.contentType = "application/json"; - - NetUtil.asyncFetch(channel, (inputStream, status) => { - if (!Components.isSuccessCode(status)) { - reject(); - return; - } - - let data = JSON.parse( - NetUtil.readInputStreamToString(inputStream, inputStream.available()) - ); - resolve(data); - }); - } catch (ex) { - reject(new Error("UserAgentUpdates: Could not fetch " + url + " " + - ex + "\n" + ex.stack)); - } - }); -} - this.UserAgentUpdates = { init: function(callback) { if (gInitialized) { |