That is the parent ticket for all things Torbutton clean-up, now that we included it into tor-browser. It's not clear yet how we'll be restructuring it but it's clear that a lot of old cruft has to go. This will be done in child tickets.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
For browser.privatebrowsing.autostart = true, cookie-jar-selector does nothing currently, so for new identity we just clearCookies().
For browser.privatebrowsing.autostart = false, some cookies json files are stored in the browser profile folder, which we clear on startup in the patch.
Bug 30851: Move default preferences to 000-tor-browser.js
This has a corresponding patch in tor-browser.
Bug 30888: move torbutton_util.js to modules/utils.js
This also has a corresponding patch in tor-browser, to stop including torbutton_util.js in browser.xul.
Make torbutton_open_network_settings global
This will have to be called somewhere in UI at some point, for now we just expose it.
Refactor code to always use tor-control-port.js
Trying to use a single implementation of tor controller. Perhaps next step would be to do the same with tor-launcher.
The code had to be adapted a bit, since tor-control-port.js is async while previous impl. was sync.
Remove versioncheck from torbutton.js
I'm assuming we don't need this, with the browser updater and having removed the blinking notification in torbutton UI. But perhaps we still want as telemetry, not sure.
Trac: Status: new to needs_review Keywords: tbb-torbutton deleted, tbb-torbutton TorBrowserTeam201907R added
I dropped some commits wrt the original torbutton changes (Refactor code to always use tor-control-port.js, Tor controller promises should fail when there is an error, Move torbutton_do_new_identity to separate module, Move some code from torbutton to torCheckService) as I was not sure whether they fit in this ticket or they added much value, and the changes were quite big already. Maybe we can continue on these on later torbutton refactors?
I think #13198 (moved) would be fixed with these changes, and perhaps #19256 (moved) too, although there might be more dead code that I missed.
Trac: Keywords: TorBrowserTeam201910 deleted, TorBrowserTeam201910R added Status: needs_revision to needs_review
Alright I started reviewing and applying patches. The first two landed on master (the latter closing #28746 (moved)): commit 2dfa0e0c9cff7cfad93664e0b0b6cdc05b24b7f2 and 938997fa6de418e423186a5fe5c3e8adf4d82a38.
Could you remove the extensions.torbutton.prompt_torbrowser pref in the commit where you are removing all the m_tb_tbb parts? It seems that pref removal belongs there.
No need to add this anymore, see my previous comment.
+// TODO: This is just part of a stopgap until #14429 gets properly implemented.+// See #7255 for details. We display the warning three times to make sure the+// user did not click on it by accident.
I think we should update the comment at least. We still have this mechanism for users that disable letterboxing, I think.
Have you tested that moving browser.startup.homepage is fine now and that we can ditch non-localized.properties in torbutton? The code mentioned in the comment is still there. But I guess we don't hit the codepath as we are not setting any default prefs in the extension anymore?
Trac: Status: needs_review to needs_revision Keywords: TorBrowserTeam201911R deleted, TorBrowserTeam201911 added
I moved the extensions.torbutton.launch_warning = false mobile override to 000-tor-browser-android.js.
Have you tested that moving browser.startup.homepage is fine now and that we can ditch non-localized.properties in torbutton? The code mentioned in the comment is still there. But I guess we don't hit the codepath as we are not setting any default prefs in the extension anymore?
Yes, I tested that it works fine.
Trac: Status: needs_revision to needs_review Keywords: TorBrowserTeam201911 deleted, TorBrowserTeam201911R added
Thanks. I closed #30851 (moved) as the updated changes look good to me. And I applied the m_tb_tbb one to torbutton's master (comit 6b1a5ded2cab7e51aeb504483fa0d8fbf0cae957). Getting closer...
Do we really need the remaining k_tb_browser_update_needed_pref parts (including the pref) now that the pref observer is gone (and the code acting upon pref changes)? What about the respective button CSS parts? Can't we get rid of them as well in this commit? For instance, if we don't set tbStatus anymore it seems to me we don't need the [tb-status="on"] and [tb-status="off"] parts anymore either etc.
Please adapt the commit message to what has happened since you wrote it. :)
Please base your new branch on current master.
Trac: Status: needs_review to needs_revision Keywords: TorBrowserTeam201911R deleted, TorBrowserTeam201911 added
With respect to the k_tb_browser_update_needed_pref comment, I decided to squash Remove versioncheck from torbutton.js and Remove code dealing with torbutton UI button in toolbar, as some of the requested changes were already included in the other commit, and I think these are related (we can remove versioncheck because there is not torbutton UI anymore).
There were some conflicts with the last commit of 28745+2 (2d318efde8faccf3980c6d7da163c32103202b26) and the 46efc92348dbed06fc31ddfb0a5ac2e4e8554de2 commit in master (#30237 (moved)). I think these are not straightforward to solve, as in that commit I moved m_tb_control_ipc_file, m_tb_control_host, m_tb_control_port, m_tb_control_pass, m_tb_control_desc to a service while in the master commit those were moved to a different module and initialized via configureControlPortModule. I would suggest dropping that commit for now, and perhaps do it later in #30850 (moved) (some of the previous dropped commits are also related to that one).
Trac: Keywords: TorBrowserTeam201911 deleted, TorBrowserTeam201911R added Status: assigned to needs_review