Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
torbutton
Commits
5b13748c
Commit
5b13748c
authored
May 28, 2019
by
Alex Catarineu
Browse files
Remove aboutTor component
parent
4dd346e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
components/aboutTor.js
deleted
100644 → 0
View file @
4dd346e2
/*************************************************************************
* Copyright (c) 2017, The Tor Project, Inc.
* See LICENSE for licensing information.
*
* vim: set sw=2 sts=2 ts=8 et syntax=javascript:
*
* about:tor component
*************************************************************************/
// Module specific constants
const
kMODULE_NAME
=
"
about:tor
"
;
const
kMODULE_CONTRACTID
=
"
@mozilla.org/network/protocol/about;1?what=tor
"
;
const
kMODULE_CID
=
Components
.
ID
(
"
84d47da6-79c3-4661-aa9f-8049476f7bf5
"
);
const
kAboutTorURL
=
"
chrome://torbutton/content/aboutTor/aboutTor.xhtml
"
;
const
{
XPCOMUtils
}
=
ChromeUtils
.
import
(
"
resource://gre/modules/XPCOMUtils.jsm
"
);
const
{
Services
}
=
ChromeUtils
.
import
(
"
resource://gre/modules/Services.jsm
"
);
function
AboutTor
()
{}
AboutTor
.
prototype
=
{
QueryInterface
:
ChromeUtils
.
generateQI
([
Ci
.
nsIAboutModule
]),
// nsIClassInfo implementation:
classDescription
:
kMODULE_NAME
,
classID
:
kMODULE_CID
,
contractID
:
kMODULE_CONTRACTID
,
// nsIAboutModule implementation:
newChannel
(
aURI
,
aLoadInfo
)
{
let
ioSvc
=
Services
.
io
;
let
uri
=
ioSvc
.
newURI
(
kAboutTorURL
);
let
channel
=
ioSvc
.
newChannelFromURIWithLoadInfo
(
uri
,
aLoadInfo
);
channel
.
originalURI
=
aURI
;
return
channel
;
},
getURIFlags
:
function
(
aURI
)
{
return
Ci
.
nsIAboutModule
.
URI_SAFE_FOR_UNTRUSTED_CONTENT
|
Ci
.
nsIAboutModule
.
URI_MUST_LOAD_IN_CHILD
|
Ci
.
nsIAboutModule
.
ALLOW_SCRIPT
;
}
};
let
factory
=
XPCOMUtils
.
_getFactory
(
AboutTor
);
let
reg
=
Components
.
manager
.
QueryInterface
(
Ci
.
nsIComponentRegistrar
);
reg
.
registerFactory
(
kMODULE_CID
,
""
,
kMODULE_CONTRACTID
,
factory
);
components/startup-observer.js
View file @
5b13748c
...
...
@@ -62,13 +62,6 @@ function StartupObserver() {
}
catch
(
e
)
{
this
.
logger
.
log
(
4
,
"
Early proxy change failed. Will try again at profile load. Error:
"
+
e
);
}
// Arrange for our about:tor handler to be loaded in the default (chrome)
// process as well as in each content process.
let
ppmm
=
Cc
[
"
@mozilla.org/parentprocessmessagemanager;1
"
]
.
getService
(
Ci
.
nsIProcessScriptLoader
);
ppmm
.
loadProcessScript
(
"
resource://torbutton/components/aboutTor.js
"
,
true
);
}
StartupObserver
.
prototype
=
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment