Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Tor Browser
Commits
a5973001
Verified
Commit
a5973001
authored
May 11, 2023
by
Pier Angelo Vendrame
Browse files
Options
Downloads
Patches
Plain Diff
fixup! Bug 40925: Implemented the Security Level component
Linted
parent
c043564a
No related branches found
No related tags found
1 merge request
!678
Bug 41759: Rebase Base Browser to 115 (Beta 5)
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
browser/components/securitylevel/content/securityLevel.js
+1
-1
1 addition, 1 deletion
browser/components/securitylevel/content/securityLevel.js
toolkit/components/securitylevel/SecurityLevel.jsm
+23
-28
23 additions, 28 deletions
toolkit/components/securitylevel/SecurityLevel.jsm
with
24 additions
and
29 deletions
browser/components/securitylevel/content/securityLevel.js
+
1
−
1
View file @
a5973001
...
...
@@ -383,7 +383,7 @@ var SecurityLevelPreferences = {
/**
* A list of radio options and their containers.
*
* @type {Array<
O
bject>}
* @type {Array<
o
bject>}
*/
_radioOptions
:
null
,
...
...
This diff is collapsed.
Click to expand it.
toolkit/components/securitylevel/SecurityLevel.jsm
+
23
−
28
View file @
a5973001
...
...
@@ -3,29 +3,24 @@
var
EXPORTED_SYMBOLS
=
[
"SecurityLevel"
];
const
{
Services
}
=
ChromeUtils
.
import
(
"resource://gre/modules/Services.jsm"
);
const
BrowserTopics
=
Object
.
freeze
({
ProfileAfterChange
:
"profile-after-change"
,
});
const
{
XPCOMUtils
}
=
ChromeUtils
.
import
(
"resource://gre/modules/XPCOMUtils.jsm"
);
const
{
ConsoleAPI
}
=
ChromeUtils
.
import
(
"resource://gre/modules/Console.jsm"
);
const
lazy
=
{};
XPCOMUtils
.
defineLazyModuleGetters
(
this
,
{
XPCOMUtils
.
defineLazyModuleGetters
(
lazy
,
{
ExtensionParent
:
"resource://gre/modules/ExtensionParent.jsm"
,
});
// Logger adapted from CustomizableUI.jsm
XPCOMUtils
.
defineLazyGetter
(
this
,
"logger"
,
()
=>
{
const
{
ConsoleAPI
}
=
ChromeUtils
.
import
(
"resource://gre/modules/Console.jsm"
);
let
consoleOptions
=
{
const
logger
=
new
ConsoleAPI
({
maxLogLevel
:
"info"
,
prefix
:
"SecurityLevel"
,
};
return
new
ConsoleAPI
(
consoleOptions
);
});
const
BrowserTopics
=
Object
.
freeze
({
ProfileAfterChange
:
"profile-after-change"
,
});
// The Security Settings prefs in question.
...
...
@@ -79,7 +74,7 @@ var bindPrefAndInit = (prefName, prefHandler) =>
bindPref
(
prefName
,
prefHandler
,
true
);
async
function
waitForExtensionMessage
(
extensionId
,
checker
=
()
=>
{})
{
const
{
torWaitForExtensionMessage
}
=
ExtensionParent
;
const
{
torWaitForExtensionMessage
}
=
lazy
.
ExtensionParent
;
if
(
torWaitForExtensionMessage
)
{
return
torWaitForExtensionMessage
(
extensionId
,
checker
);
}
...
...
@@ -87,7 +82,7 @@ async function waitForExtensionMessage(extensionId, checker = () => {}) {
}
async
function
sendExtensionMessage
(
extensionId
,
message
)
{
const
{
torSendExtensionMessage
}
=
ExtensionParent
;
const
{
torSendExtensionMessage
}
=
lazy
.
ExtensionParent
;
if
(
torSendExtensionMessage
)
{
return
torSendExtensionMessage
(
extensionId
,
message
);
}
...
...
@@ -415,7 +410,7 @@ function migratePreferences() {
security_custom
:
"security_level.security_custom"
,
noscript_persist
:
"security_level.noscript_persist"
,
noscript_inited
:
"security_level.noscript_inited"
,
}
}
;
for
(
const
[
oldName
,
newName
]
of
Object
.
entries
(
prefs
))
{
migrate
(
oldName
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment