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
64a7ad48
Verified
Commit
64a7ad48
authored
Sep 10, 2024
by
Pier Angelo Vendrame
Browse files
Options
Downloads
Patches
Plain Diff
fixup! Bug 42027: Base Browser migration procedures.
Bug 43124: Implement a migration procedure for Android.
parent
7e440906
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1222
Bug 43166: Rebased alpha onto 128.3.0esr
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs
+46
-0
46 additions, 0 deletions
mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs
with
46 additions
and
0 deletions
mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs
+
46
−
0
View file @
64a7ad48
...
...
@@ -259,6 +259,8 @@ export class GeckoViewStartup {
"
GeckoView:InitialForeground
"
,
]);
this
.
#migratePreferences
();
Services
.
obs
.
addObserver
(
this
,
"
browser-idle-startup-tasks-finished
"
);
Services
.
obs
.
addObserver
(
this
,
"
handlersvc-store-initialized
"
);
...
...
@@ -365,6 +367,50 @@ export class GeckoViewStartup {
break
;
}
}
/**
* This is the equivalent of BrowserGlue._migrateUITBB.
*/
#migratePreferences
()
{
const
MIGRATION_VERSION
=
1
;
const
MIGRATION_PREF
=
"
torbrowser.migration_android.version
"
;
// We do not have a way to check for new profiles on Android.
// However, the first version is harmless for new installs, so run it
// anyway.
const
currentVersion
=
Services
.
prefs
.
getIntPref
(
MIGRATION_PREF
,
0
);
if
(
currentVersion
<
1
)
{
// First implementation of the migration on Android (tor-browser#43124,
// 14.0a5, September 2024).
const
prefToClear
=
[
// Old torbutton preferences not used anymore.
// Some of them should have never been set on Android, as on Android we
// force PBM... But who knows about very old profiles.
"
browser.cache.disk.enable
"
,
"
places.history.enabled
"
,
"
security.nocertdb
"
,
"
permissions.memory_only
"
,
"
extensions.torbutton.loglevel
"
,
"
extensions.torbutton.logmethod
"
,
"
extensions.torbutton.pref_fixup_version
"
,
"
extensions.torbutton.resize_new_windows
"
,
"
extensions.torbutton.startup
"
,
"
extensions.torlauncher.prompt_for_locale
"
,
"
extensions.torlauncher.loglevel
"
,
"
extensions.torlauncher.logmethod
"
,
"
extensions.torlauncher.torrc_fixup_version
"
,
// tor-browser#42149: Do not change HTTPS-Only settings in the security
// level.
"
dom.security.https_only_mode_send_http_background_request
"
,
];
for
(
const
pref
of
prefToClear
)
{
if
(
Services
.
prefs
.
prefHasUserValue
(
pref
))
{
Services
.
prefs
.
clearUserPref
(
pref
);
}
}
}
Services
.
prefs
.
setIntPref
(
MIGRATION_PREF
,
MIGRATION_VERSION
);
}
}
GeckoViewStartup
.
prototype
.
classID
=
Components
.
ID
(
...
...
...
...
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
sign in
to comment