lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

  • 18606 discussions
[Git][tpo/applications/tor-browser][tor-browser-115.11.0esr-13.5-1] 2 commits: fixup! Base Browser strings
by richard (@richard) 16 May '24

16 May '24
richard pushed to branch tor-browser-115.11.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 900fb923 by Henry Wilkes at 2024-05-16T12:56:28+01:00 fixup! Base Browser strings Bug 42347: Add a notification for dropped OS version support. - - - - - 4a1e3ba3 by Henry Wilkes at 2024-05-16T12:56:28+01:00 Bug 42347: Add a notification for dropped OS version support. - - - - - 4 changed files: - browser/base/content/browser.xhtml - + browser/base/content/droppedSupportNotification.js - browser/base/jar.mn - toolkit/locales/en-US/toolkit/global/base-browser.ftl Changes: ===================================== browser/base/content/browser.xhtml ===================================== @@ -132,6 +132,7 @@ Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this); Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this); Services.scriptloader.loadSubScript("chrome://browser/content/languageNotification.js", this); + Services.scriptloader.loadSubScript("chrome://browser/content/droppedSupportNotification.js", this); window.onload = gBrowserInit.onLoad.bind(gBrowserInit); window.onunload = gBrowserInit.onUnload.bind(gBrowserInit); ===================================== browser/base/content/droppedSupportNotification.js ===================================== @@ -0,0 +1,69 @@ +"use strict"; + +// Show a prompt that a user's system will no longer be supported. +window.addEventListener("load", () => { + let labelId; + // Expire date is 2024-10-01 (1st October 2024). + const isExpired = Date.now() > Date.UTC(2024, 9, 1); + + if ( + AppConstants.platform === "macosx" && + Services.vc.compare( + Services.sysinfo.getProperty("version"), + "19.0" // MacOS 10.15 begins with Darwin 19.0 + ) < 0 + ) { + labelId = isExpired + ? "dropped-support-notification-macos-version-less-than-10-15-expired" + : "dropped-support-notification-macos-version-less-than-10-15"; + } else if ( + AppConstants.platform === "win" && + Services.vc.compare(Services.sysinfo.getProperty("version"), "10.0") < 0 + ) { + labelId = isExpired + ? "dropped-support-notification-win-os-version-less-than-10-expired" + : "dropped-support-notification-win-os-version-less-than-10"; + } + + const dismissedPref = + "browser.dropped_support_notification_v14.dismiss_version"; + + if (!labelId) { + // Avoid setting any preferences for supported versions, and clean up any + // old values if the user ported their profile. + Services.prefs.clearUserPref(dismissedPref); + return; + } + + if ( + !isExpired && + Services.prefs.getStringPref(dismissedPref, "") === + AppConstants.BASE_BROWSER_VERSION + ) { + // Already dismissed since the last update. + return; + } + + const buttons = isExpired + ? undefined + : [ + { + "l10n-id": "dropped-support-notification-dismiss-button", + callback: () => { + Services.prefs.setStringPref( + dismissedPref, + AppConstants.BASE_BROWSER_VERSION + ); + }, + }, + ]; + + gNotificationBox.appendNotification( + "dropped-support-notification", + { + label: { "l10n-id": labelId }, + priority: gNotificationBox.PRIORITY_WARNING_HIGH, + }, + buttons + ); +}); ===================================== browser/base/jar.mn ===================================== @@ -111,4 +111,5 @@ browser.jar: content/browser/spotlight.js (content/spotlight.js) * content/browser/default-bookmarks.html (content/default-bookmarks.html) + content/browser/droppedSupportNotification.js (content/droppedSupportNotification.js) content/browser/languageNotification.js (content/languageNotification.js) ===================================== toolkit/locales/en-US/toolkit/global/base-browser.ftl ===================================== @@ -166,3 +166,21 @@ security-level-summary-custom = Your custom browser preferences have resulted in # Button to undo custom changes to the security level and place the user in one of the standard security levels. # Shown in the security level panel and settings. security-level-restore-defaults-button = Restore defaults + +## Notification for dropped operating system support. + +# "{ -brand-short-name }" will be replaced with the localized name of the browser, e.g. "Tor Browser". +# "14.0" refers to the browser versions number: Tor Browser 14.0. +# "macOS" is a brand name, and 10.15 is the macOS version number. +dropped-support-notification-macos-version-less-than-10-15 = The next major version of { -brand-short-name } (14.0) will no longer support this version of macOS. Please upgrade to macOS 10.15 or later by October 1st 2024 to continue receiving important security updates. +# "{ -brand-short-name }" will be replaced with the localized name of the browser, e.g. "Tor Browser". +# "macOS" is a brand name, and 10.15 is the macOS version number. +dropped-support-notification-macos-version-less-than-10-15-expired = { -brand-short-name } no longer supports this version of macOS. Please upgrade to macOS 10.15 or later to continue receiving important security updates. +# "{ -brand-short-name }" will be replaced with the localized name of the browser, e.g. "Tor Browser". +# "14.0" refers to the browser versions number: Tor Browser 14.0. +# "Windows" is a brand name, and "Windows 10" is the version. +dropped-support-notification-win-os-version-less-than-10 = The next major version of { -brand-short-name } (14.0) will no longer support this version of Windows. Please upgrade to Windows 10 or later by October 1st 2024 to continue receiving important security updates. +# "{ -brand-short-name }" will be replaced with the localized name of the browser, e.g. "Tor Browser". +# "Windows" is a brand name, and "Windows 10" is the version. +dropped-support-notification-win-os-version-less-than-10-expired = { -brand-short-name } no longer supports this version of Windows. Please upgrade to Windows 10 or later to continue receiving important security updates. +dropped-support-notification-dismiss-button = Got it View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/c67ac1… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/c67ac1… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][main] Bug 41148: Update NoScript license to GPL V3.
by ma1 (@ma1) 16 May '24

16 May '24
ma1 pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: 1dc061f3 by hackademix at 2024-05-16T12:45:58+02:00 Bug 41148: Update NoScript license to GPL V3. - - - - - 1 changed file: - projects/browser/Bundle-Data/Docs/Licenses/NoScript.txt Changes: ===================================== projects/browser/Bundle-Data/Docs/Licenses/NoScript.txt ===================================== @@ -1,9 +1,9 @@ NoScript - a Firefox extension for whitelist driven safe JavaScript execution -Copyright (C) 2005-2023 Giorgio Maone - https://maone.net +Copyright (C) 2005-2024 Giorgio Maone - https://maone.net This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or +the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/1… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/1… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.11.0esr-13.5-1] fixup! Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing
by richard (@richard) 16 May '24

16 May '24
richard pushed to branch tor-browser-115.11.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: c67ac157 by Dan Ballard at 2024-05-16T10:30:16+00:00 fixup! Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing bug 42290: change duckduckgoonion to duckduckgo onion and same for startpageonion - - - - - 2 changed files: - browser/components/search/extensions/ddg-onion/manifest.json - browser/components/search/extensions/startpage-onion/manifest.json Changes: ===================================== browser/components/search/extensions/ddg-onion/manifest.json ===================================== @@ -1,5 +1,5 @@ { - "name": "DuckDuckGoOnion", + "name": "DuckDuckGo (.onion)", "description": "Duck Duck Go Onion", "manifest_version": 2, "version": "1.0", @@ -17,7 +17,7 @@ ], "chrome_settings_overrides": { "search_provider": { - "name": "DuckDuckGoOnion", + "name": "DuckDuckGo (.onion)", "search_url": "https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion", "search_form": "https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/?q={…", "search_url_get_params": "q={searchTerms}", ===================================== browser/components/search/extensions/startpage-onion/manifest.json ===================================== @@ -1,5 +1,5 @@ { - "name": "StartpageOnion", + "name": "Startpage (.onion)", "description": "Startpage Onion", "manifest_version": 2, "version": "1.0", @@ -17,7 +17,7 @@ ], "chrome_settings_overrides": { "search_provider": { - "name": "StartpageOnion", + "name": "Startpage (.onion)", "search_url": "http://startpagel6srwcjlue4zgq3zevrujfaow726kjytqbbjyrswwmjzcqd.onion/sp/se…", "search_form": "http://startpagel6srwcjlue4zgq3zevrujfaow726kjytqbbjyrswwmjzcqd.onion/sp/se…", "search_url_post_params": "q={searchTerms}" View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c67ac15… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c67ac15… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.11.0esr-13.5-1] fixup! Bug 42562: Normalized the Accepted Languages on Android.
by Pier Angelo Vendrame (@pierov) 15 May '24

15 May '24
Pier Angelo Vendrame pushed to branch tor-browser-115.11.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 66370dbe by Pier Angelo Vendrame at 2024-05-15T10:59:36+02:00 fixup! Bug 42562: Normalized the Accepted Languages on Android. Bug 42582: Use toLanguageTag() instead of toString() - - - - - 1 changed file: - mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java Changes: ===================================== mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java ===================================== @@ -850,7 +850,7 @@ public final class GeckoRuntimeSettings extends RuntimeSettings { } } } - String acceptLanguages = locale != null ? locale.toString().replace('_', '-') : "en-US"; + String acceptLanguages = locale != null ? locale.toLanguageTag().replace('_', '-') : "en-US"; if (acceptLanguages.equals("en-US")) { // For consistency with spoof English. acceptLanguages += ", en"; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/66370db… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/66370db… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Add Tor integration and UI
by Dan Ballard (@dan) 15 May '24

15 May '24
Dan Ballard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android Commits: 110d8f18 by clairehurst at 2024-05-15T19:04:04+00:00 fixup! Add Tor integration and UI - - - - - 4 changed files: - fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt - fenix/app/src/main/java/org/mozilla/fenix/settings/TorSecurityLevelFragment.kt - fenix/app/src/main/res/navigation/nav_graph.xml - fenix/app/src/main/res/xml/preferences.xml Changes: ===================================== fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt ===================================== @@ -65,6 +65,7 @@ import org.mozilla.fenix.nimbus.FxNimbus import org.mozilla.fenix.perf.ProfilerViewModel import org.mozilla.fenix.settings.account.AccountUiView import org.mozilla.fenix.tor.QuickStartPreference +import org.mozilla.fenix.tor.SecurityLevel import org.mozilla.fenix.tor.TorBridgeTransportConfig import org.mozilla.fenix.tor.TorEvents import org.mozilla.fenix.utils.Settings @@ -537,6 +538,7 @@ class SettingsFragment : PreferenceFragmentCompat() { setupAmoCollectionOverridePreference(requireContext().settings()) setupGeckoLogsPreference(requireContext().settings()) setupAllowDomesticChinaFxaServerPreference() + setupSecurityLevelPreference() setupHttpsOnlyPreferences() setupNotificationPreference() setupSearchPreference() @@ -772,6 +774,19 @@ class SettingsFragment : PreferenceFragmentCompat() { } } + @VisibleForTesting + internal fun setupSecurityLevelPreference() { + val securityLevelPreference = + requirePreference<Preference>(R.string.pref_key_tor_security_level_settings) + securityLevelPreference.summary = context?.settings()?.torSecurityLevel()?.let { + when (it) { + SecurityLevel.STANDARD -> getString(R.string.tor_security_level_standard_option) + SecurityLevel.SAFER -> getString(R.string.tor_security_level_safer_option) + SecurityLevel.SAFEST -> getString(R.string.tor_security_level_safest_option) + } + } + } + @VisibleForTesting internal fun setupHttpsOnlyPreferences() { val httpsOnlyPreference = ===================================== fenix/app/src/main/java/org/mozilla/fenix/settings/TorSecurityLevelFragment.kt ===================================== @@ -24,11 +24,6 @@ class TorSecurityLevelFragment : PreferenceFragmentCompat() { private val securityLevelRadioGroups = mutableListOf<GroupableRadioButton>() private var previousSecurityLevel: SecurityLevel? = null - override fun onResume() { - super.onResume() - showToolbar(getString(R.string.preferences_tor_security_level_options)) - } - override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { setPreferencesFromResource(R.xml.tor_security_level_preferences, rootKey) ===================================== fenix/app/src/main/res/navigation/nav_graph.xml ===================================== @@ -956,7 +956,7 @@ <fragment android:id="@+id/torSecurityLevelFragment" android:name="org.mozilla.fenix.settings.TorSecurityLevelFragment" - android:label="@string/preferences_tor_security_level_settings" /> + android:label="@string/preferences_tor_security_level_options" /> <fragment android:id="@+id/privateBrowsingFragment" android:name="org.mozilla.fenix.settings.PrivateBrowsingFragment" ===================================== fenix/app/src/main/res/xml/preferences.xml ===================================== @@ -99,7 +99,7 @@ <androidx.preference.Preference android:key="@string/pref_key_tor_security_level_settings" app:iconSpaceReserved="false" - android:title="@string/preferences_tor_security_level_settings" /> + android:title="@string/preferences_tor_security_level_options" /> <androidx.preference.Preference android:key="@string/pref_key_private_browsing" View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/110… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/110… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][main] Bug 41143: Add Firefox's localization files also to GeckoView.
by Pier Angelo Vendrame (@pierov) 15 May '24

15 May '24
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: 84219469 by Pier Angelo Vendrame at 2024-05-15T10:19:02+02:00 Bug 41143: Add Firefox&#39;s localization files also to GeckoView. They are needed for formatting APIs to work as expected. - - - - - 3 changed files: - projects/firefox-l10n/config - projects/geckoview/config - projects/geckoview/merge_aars Changes: ===================================== projects/firefox-l10n/config ===================================== @@ -21,11 +21,17 @@ steps: input_files => sub { my ($project, $options) = @_; my @input_files; - my $changesets_json = project_config('firefox', 'var/l10n-changesets', { %$options, origin_project => $project }); + my $is_android = project_config($project, 'var/android', $options); + my $source_project = $is_android ? 'geckoview' : 'firefox'; + my $locales_key = $is_android ? 'var/locales_mobile' : 'var/locales'; + my $changesets_json = project_config($source_project, 'var/l10n-changesets', { %$options, origin_project => $project }); my $d = decode_json $changesets_json; - my $locales = project_config($project, 'var/locales', $options); + my $locales = project_config($project, $locales_key, $options); foreach my $loc (@$locales) { my $locale = process_template($project, $loc, '.'); + $locale =~ s/-r/-/; + $locale = "id" if ($is_android && $locale eq "in"); + $locale = "he" if ($is_android && $locale eq "iw"); next unless my $revision = $d->{$locale}{revision}; my $input_file = { name => $locale, ===================================== projects/geckoview/config ===================================== @@ -33,6 +33,8 @@ var: gradle_dependencies_version: 12 gradle_version: 7.5.1 variant: beta + has_l10n: '[% !c("var/testbuild") && !c("var/locales").empty %]' + l10n-changesets: '[% exec("cat browser/locales/l10n-changesets.json") %]' targets: release: @@ -84,6 +86,12 @@ steps: pkg_type: build target_prepend: - torbrowser-android-x86_64 + - project: firefox-l10n + name: firefox-l10n + enable: '[% c("var/has_l10n") %]' + pkg_type: build + target_prepend: + - torbrowser-android-armv7 list_toolchain_updates: git_url: https://github.com/mozilla/gecko-dev.git ===================================== projects/geckoview/merge_aars ===================================== @@ -49,6 +49,19 @@ cp -rl $gradle_repo/maven2/* $gradle_repo || true export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system # Create .mozbuild to avoid interactive prompt in configure mkdir "$HOME/.mozbuild" + +[% IF c("var/has_l10n") -%] + supported_locales="[% tmpl(c('var/locales_mobile').join(' ')).replace('-r', '-').replace('in', 'id').replace('iw', 'he') %]" + l10ncentral="$HOME/.mozbuild/l10n-central" + mkdir "$l10ncentral" + for tarball in $rootdir/[% c('input_files_by_name/firefox-l10n') %]/*; do + tar -C "$l10ncentral" -xf "$tarball" + done + + # Do not setup our localization files, as we do not provide any frontend + # through GeckoView. +[% END -%] + # We still need to specify --tor-browser-version due to bug 34005. ./mach configure \ --with-base-browser-version=[% c("var/torbrowser_version") %] \ @@ -56,6 +69,12 @@ mkdir "$HOME/.mozbuild" [% IF !c("var/rlbox") -%]--without-wasm-sandboxed-libraries[% END %] ./mach build --verbose + +[% IF c('var/has_l10n') -%] + # No quotes on purpose, to pass each locale as an additional argument. + ./mach package-multi-locale --locales en-US $supported_locales +[% END -%] + # We prepare an archive to then extract it as we were using a local Maven # repository. # See also https://github.com/mozilla-mobile/firefox-android/blob/main/fenix/docs/subs… View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/8… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/8… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Disable features and functionality
by ma1 (@ma1) 15 May '24

15 May '24
ma1 pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android Commits: 6eaa81ce by hackademix at 2024-05-15T07:39:36+02:00 fixup! Disable features and functionality Bug 42578: Reject Android &quot;open in Tor Browser&quot; intent - - - - - 1 changed file: - fenix/app/src/main/java/org/mozilla/fenix/home/intent/HomeDeepLinkIntentProcessor.kt Changes: ===================================== fenix/app/src/main/java/org/mozilla/fenix/home/intent/HomeDeepLinkIntentProcessor.kt ===================================== @@ -90,6 +90,15 @@ class HomeDeepLinkIntentProcessor( logger.info("Not opening deep link: $url") return } + if (BuildConfig.DEEP_LINK_SCHEME.startsWith("torbrowser")) { + // tor-browser#42578 + // TODO: + // Maybe just warn users about linkability but + // give them the choice to open anyway, once + // the other deep link related issues are fixed. + logger.info("Tor Browser rejects open intent deep link: $deepLink") + return + } activity.openToBrowserAndLoad( url, View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/6ea… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/6ea… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Add Tor integration and UI
by richard (@richard) 14 May '24

14 May '24
richard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android Commits: 6abe2084 by Richard Pospesel at 2024-05-14T18:44:55+00:00 fixup! Add Tor integration and UI removed vestigal comment - - - - - 1 changed file: - fenix/app/src/main/AndroidManifest.xml Changes: ===================================== fenix/app/src/main/AndroidManifest.xml ===================================== @@ -366,7 +366,6 @@ android:value="androidx.startup" tools:node="remove" /> </provider> - <!-- Define Orbotservice's TorService --> </application> </manifest> View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/6ab… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/6ab… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Bug 40009: Change the default search engines
by Dan Ballard (@dan) 14 May '24

14 May '24
Dan Ballard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android Commits: e8c1e87b by Dan Ballard at 2024-05-14T16:04:35+00:00 fixup! Bug 40009: Change the default search engines Bug 42290: update Duckduckgoonion to duckduckgo (.onion) and startpage - - - - - 3 changed files: - android-components/components/feature/search/src/main/assets/search/list.json - android-components/components/feature/search/src/main/assets/searchplugins/ddg-onion.xml - android-components/components/feature/search/src/main/assets/searchplugins/startpage-onion.xml Changes: ===================================== android-components/components/feature/search/src/main/assets/search/list.json ===================================== @@ -1,7 +1,7 @@ { "default": { "searchDefault": "DuckDuckGo", - "searchOrder": ["DuckDuckGo", "DuckDuckGo Onion", "Startpage", "Startpage Onion","Wikipedia"], + "searchOrder": ["DuckDuckGo", "DuckDuckGo (.onion)", "Startpage", "Startpage (.onion)","Wikipedia"], "visibleDefaultEngines": [ "ddg", "ddg-onion", "startpage", "startpage-onion", "wikipedia" ] ===================================== android-components/components/feature/search/src/main/assets/searchplugins/ddg-onion.xml ===================================== @@ -1,5 +1,5 @@ <SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> -<ShortName>DuckDuckGo Onion</ShortName> +<ShortName>DuckDuckGo (.onion)</ShortName> <Description>Duck Duck Go Onion</Description> <InputEncoding>UTF-8</InputEncoding> <Image height="16" width="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAB8lBMVEUAAADkRQzjPwPjQQXkRQ3iPwTiQQXgPQPeQgrcOwPVNgDVNQDWOgbTMwDRMgDQMwDSMwDRNwTQLgDRJgDSJwDSLgDSNwTjOgDiOADjOQDkPADhQAXzs5v+/fv////0vKbiRQvgPQHpdUr85NzuknPdKgDcIwDnZzj2w7HqeU/gPQLsimb/+PftjWn97Obpb0LdJQDeLQDtjmvsi2jgSBDnbULgOQD/39HgLQDeMgDpeFLgSBH0v670uqbaJQD2qImWvP/G1Ob5+/3u//+fvvXyp47dMwDaLwD0u6v0v6/aNQDiXi/aKQD3qozU7/8gSY2vvtg0ZK/OqLDaKQHYKgLgWTfaNADZMgDZMADZLADzqpD7//+xwdz//9H/5Bn/7Bn//ADofADYMADYMQDZOgPXLgDiZDj//97/0AD3tQDvlgHZOgbXLATXMADWMgDfXjLVLQD///z+0AD/3Rn/yRnwnQDcVjbVMQDyv67wuKTSJwDRHQD+8O/tg3/iQQDwhAHnawHWMADvtKfyva7XQxHga0bQGQD2vbH/u8LXIQCmPQzja07XQxLliGn99fPkcVHvhnGZ5VguvUU5wktBwCcAgxzydVv/8/XmiGngdlL+ysi3+I8LtCE80V6P3YmX4sDleljSNQLzr6D7sKPXNQTSIwAEAbMrAAAAF3RSTlMARqSkRvPz80PTpKRG3fPe3hio9/eoGP50jNsAAAABYktHRB5yCiArAAAAyElEQVQYGQXBvUqCYRiA4fu2V9Tn+UQddI3aCpxaOoU6iU4gcqqpoYbALXBuCuoYmttamqJDiEoh4YP+MOi6BNCh+uYKEGiOVNCXXxA2XDVV/UyfKbRCXTLQWAxbP2vt8Ue/uYDvfim91615sb2um6rqtrr/NFb1cUf1Ybd06areU6lSlYpK79jzK1SyJOkfhOl8JGEcqV5zoKrTRqO6yUzIzNu46ijdM1VV9bhuUJ/nZURExLRzUiPQm3kKXHi4BAEGOmOi78A/L1QoU/VHoTsAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTQtMDEtMTlUMjA6MDE6MTEtMDU6MDAuET6cAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE0LTAxLTE5VDIwOjAxOjExLTA1OjAwX0yGIAAAAABJRU5ErkJggg==</Image> ===================================== android-components/components/feature/search/src/main/assets/searchplugins/startpage-onion.xml ===================================== @@ -1,5 +1,5 @@ <SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> -<ShortName>Startpage Onion</ShortName> +<ShortName>Startpage (.onion)</ShortName> <Description>Start Page Onion</Description> <InputEncoding>UTF-8</InputEncoding> <Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAASsUlEQVR42qSXXWoCQRCElzxKTiOeSMBLhuAZgscQAR/dXU2aBfnggykaIpTTU9aU3fO3OtXro7C1y/LcFY7zvH4Xbsuy/lZ/wzwTgxWIG2rpqxXy+L4u51+89G2soe/vft6rPRdO6/r6fM/3hndQHx5K+IORk9yM3sUoebSMYTLQo8EPrvoFPODXOIH4AHjGhlg52ROu4AUd1EMsr0thzyLUqwT7Iq8qhsJVcNgNWhgVKA06ChfgKdq8NZ4QeBYZvTSatKQJ34V24HMtHLYFeDxen/XBxRP+HlwIhVmjogQKt6fjcVs69RlPzoAxWUMtLDy8a8BLebj+MHa7bXZTdU7hDvUJsMY8eiF4tjR4DxEW2SfMnj6VQHXJX2jw8jxO9XYOiScT0DqSGXnX+JnSf3ZYj681juUvfS//AYfn11TB3XeWJ9JHzn34NRz3yNPCA1090vmaCt72NWfPkW94FihP8Z7n2+RdTCuT/NNS0A7KC5fAjst5mnfuLt65CT1PanHN8PYyPw0mV6tMrCNtTXpgd+KwCI77z5LC6GpreMKHuttXkjFx/FKy8P04JIPGY80L0sJ3Y+Mf9dlTdcf/EGzwqXNcQG/HEftEdTzQ3/94NQsey2EYCPfHHjMzMzMzMzMzMzMzM1HsOyvqKoo+PW+PJFnPTbPJBjyZcfou6JNnQe89DHrzzi+7HfT+Qyuzd9ReIIZDRmKsIpup0T+zLqxbgAJ0pDxQu5yj88GEB3xa/+6DoDv2BZ2+QLT3cNF2vUWbdRZt2F60gVk7860svus1TNTq7tof9N4D3OEwaT+A1QSqD9HnQo/7Po+mAk5+EmPOhAL7gPYofJ+/DLphW9Dew0SbdLJJjlZOesP4HBcg95OFsb/tO0J04/agL16FPNQdRsT/Mws8H9o4QpgZFbUPM/8g4br+e9ux0xaUO1zrrIH9/olZhHQRnbNU9MGjAJTQ27EY3b4+YshyWVXBGJ51Ds/McHy28uZt0KVr4iQ1bFc3+eWONj+Wt4tl+bsYBeSr5uUtuor1ZX3CjgQm5pIDWKg/PMwLDp28w6wcfumUz9s7fzlojyEZlJRw0y61EnrA2gMEpX8Hz10Hip67mOM/CsMMSsj3oYi1D58thRNClK10cuKsBdZtDdrU4KadDyMMSXFn+3W5vvW9ZnPQr19rwoVzsFKmt0LikSGIGmfOy8KkrM/Zws+fg85eInFnlvCSQA1ObgYl7GvFOuaLTpoj+ukzirT6wocjQtnnqEhoKHcCUIP2A2Hn06egMxfahLjwYZPO5clzUk7PXB/aHTdD9MNHTE/TJGZ1kOl5rNGMUuiQimCYYeNbsLjzvwSdu1Q8ePgPxsxq8hzRj59C1WtRj/H5Io2FGB2edP3IORHKpm7aEcrBI7yk0FBCk/1GS+qY385ftNiG+Va/9MmkDgaXrBE+E6LhbvYXgJgVlpcLkIUgYppPzdL3F6+GUlT9qSWUlNkRl2tZhvXLhWzUQfTw8aB8fuFuBtjxoKt8Zis4xPyQ4nvgmKMx2ldBWGU7Pv4ahx88TnTBCtEtu4LuPRR03+Ggm3cGnb9cdMBo0eZd0ogQiBAf5lr3EH36HFiKn1rwYco3oqGcH/EvpqO/dK3HcJLJycptRw4cI7rnUEwn5JGZ+0+f2YKYtoC+KvgTZwv3xT7Dj79gWF5kDaO48G/6Y/nDx0FbdkvDXDn8gf10HiB65GSwwxvZCV/GR3v3Pi5Eq+65MmaxZpZS3cYdRC9c9oQk53KYFdX71i5NR3up55Tzkx907jJh9tGuNiuZOEv05eua4W/mvIvZ1J5Ds2hz/Vjf4O7rV0wdcyqG56nSTZtZ4Sk4Fh15hxEODLdzAcQwJBoXQWzRTKxB+Hqsg9+9fhPsfLBJTvqGhW9nJnV+446il6/57TNT+n2/AMWbVCIRxtCwYXsAeGH2UtLF6Qts8pN2mNK6H0Tl59TLV8HuE0DUKfrlppg+XxzqmZW7F/e+cC2q5UX42bh0v5HiCqDU+gwXw273do3f+f6tu3YmVBN7bXqKRRDMh8cQ/4gFBWVhFQj3acXt8DUG47AOKf1fdVWvXPcv25l1oGbBOhujGIyRaL8JNKZ+Ckknz1K/3L4v0DwDCHJui9JFKMvsSjANdVcEjZ8pGI7R5wVhsZjVy8Lckm49BmcCDZhYujlMd/gQYv0hbFY/A/zP6PikT/3pC6qF+oUr3F/1jwJ8ArH7YHD/nzQS7ACP6QnOhrJeqgRXeSqCuS03wrdkvYaWOyoNccrViHYbFJNgHMKQWUU4oPcYHXbOGDvjSU9yTZEwmDKOmVL6+jrf/f5OT/6GP3nML+V/eFicQ5OxGEsJ2GCcmy57VouWfJKIWSEL4sHVVqpmk2aX8JOkPtLUdZa+KFMTDD98PvlwxYtWMLTQd/gMSc+eB+PQJY56Zoq1FuxAH39u2/eGShB57eaf5Hf81H46pwVdMnNalS9rbt+LDCiKK/tlAVaWHz6RsS341DHzcedxOde3BOGVG/W3SI/99pmRVRdimFb2GUn8u+u34gKkjMIwt1M/UdMGY6eLzlosumiV6Ir1P5s7B5hLliyOdzbevNh+tm3btm3btm3btm1LY+OzdCe1de5MZTv5Tf1zUuPkbJ+tru66X3fX/wivniqSSOTlYE1PyjeuwXheiykoCsH9wMu8pEoYYC4aEQ0e8yY+9+q08NnX01MIp0ydZoLWYcSR95OEsrJrdT0arhHz3GtXdCJxIrcXHHSZr1DXDNCVkKsdA2E9PQ7eoSryA9GZgCIzW3hYkRmX9f1wu6qCC5BOZxTrymv1uK4VK78n749cV/d4hcRcfAWebamznI10bZa37pc8DbAMD2I6DpHAVx+n19K/IUEQ3A0+oZItzMgE8LXxxPmMzOn8HdYv9/cPhocffznc99DzLvrks+/d9+ccV+DKCAUa+GKFcaS2OBYQBpfY5i4DR8JhOn7z3W9hwSU3/T8ttVk8GtX+f42/6bZHZfql1mzgtJSyz6gSW0uVn2KcQovnBwaG4hc5ZEeupbWlIrI1Tz/nOnuwbnrz7U+dmd/ZsldVvI5rKiaqqtLMhswM7unpD1OmtIU//xoR3nzns3D/wy+ES668Mxx3ymVhrwNPC9vtekzYfLtDw/GnXj7jJeisPPKqfIrz/x0+Jiy54jbp4aavPcsvscLWYeSo8bi/r8CwUcRXOf96Im4dZkm8Eb+avQ88PWy01UFhmVW3T9u89scl2rR5XGSZLcIPP/3JFwCVUkGTjel8nBNOuyLBS1ofVP+tW+14RPRtDQAedUW+zv3RcoJpKQ4PKOHmsy9+dGzv2tcWae+DTrdd4NCusAsSyTov24GLLrdldv36eDp3xbX3qixoVahd2DkAFTIiDCh8LT29/fHrP5B/bOKXrPPTzy209Gbh3gefUxnFAo40/++wMWG19fYA1Ch+kWW3DN/98EfhuuV8lSu71BXsNN5uu+sJbPMZfyQgKG37JSI+v/Xu5zLVUfth+PLGjp0UNtv20Pp6aU1AkfGJdtj92LQjeX+qoq48KkKkESDImwGtgyITJ7WEldfeNVDgaThaZpXtw2tvfCyEWm6c5v8//46OQv4wrOehx596TbhecohgBNvJrVEmLYg3oBvaVRt1wy0PA1cJSaTFltsqXHPDA6GjozvdU6m3GLcv99U3PgprbLBn0cNfd5N9Q2dnj1cbEy0PRF8j3AdaEOFFGxEMuU2OKui6m+6XtnWiuvED7ah+tK/3hZffM03E7Sf6/Y9h4egTL4kYvsXMNBwX/+CjL2r4peVv5PNr6TFHgQZ4Pefl1z4IC0c1068VcXesE7/Ii6+4M3z48TfRtd0eY7R9sdpmIPTGF9Pd3dfU1Z9+7q1w4OHnmPDE9Xo9rtXV1ev4u43g/3Jfk3P5VMq6TbzOXKPFe9LpV+XwX42Dt6O9TNNoNtrywKadsdJau8w4J65z8kZPPvNGifYieuGBpMOxypRrQtDQ7503OFpaOurCMEEPtCBqJ+DTXEAH5lPzktfacdtdjrYdBYjw18NhTLZ8I8+AjMiIloYGzv3598iw6nq7Kwjg+Owntaa5Rkzwy0igf5y8vo6GGIuYyatSTfBffPVTWGGNnYofuh9SyiHonAtvgkUu3PCe5n1FlfJYIOukI58rRDCylwDcNoKfSGJ68+iHsaU4x4jzzSLfPDz74jsCKlRigoJoldOEgIzcWunmaivJ63/7fVjYYIsDhDD2jGP3SM2K44l4zbKr7RB+/f1fqQkRkksiYezMWClJrRtw4GVIN+74CVPCwUeeaz4gPDDBzzXacocjwtSWDpEOqcbLqRLuUxXxSnPFeW7R3ui0e+jRl0wu5CJU1GyW0scmUdvCXMynhhVOOuMqC2ESZgkxSivU7ZV1qwIjfv0MNfKYiPUGXHjU6Anh5DOvNheEgJG5TwtFeuCRFx2FIcXBevBITcw06cBXLnpEO9PyGuHnX/4OZ553fdwRO88WLWj51XdsWtBX33C/CdfcLpHjS628ncWRXUaZTl/UXSKpBdFVSmjSEt9hzBG6knx49MlXw0FHnGMaE2AEcFTj7YHtvNcJ4a77ngmjx0y0+zV9SSeefmWaU6ckzDFWW8sUBvNrAT5EwoKI0tGDUB+vdDWkL/9Fa0j+fv/JirYv0FJJLrv6rhg/vqIpvPc95MxwyFHnxfjy5eGiy28P9zzwbPjgo6/DxIkthtv4LS2tHdHQOrrYCDziuAvjixwU8V+k9Od6XUvNsYJ7OePnAP5jYeNL++eoOeX8sOFjw6rr7lYCZwZhFmTyuKYBv+R1UJ7SWTfqED4RGmNaZcs7+HROjj/V0Tyqiy+/FbQtusrJW8Tuo0++FXBcUiNmvxVBeboZSMiMwLgPhijg+VKyaY8Y5xg9liYf6vYHKckVGnRrb7yPyRZHdjXX5zh/byXaxIu8HPq3Ne47Glxwjib/fBPKpuMXq6f7HnyGxSPU+p4SWxWU123jncaa7p/DOSKQzW1NaOQHoRyLbW1dFnifadSMWhENtmtufAAQ44BDPAcVlHcGxlU3cu4m3WNI3F82T2XuDs/z9w8fOc7ixgUu8k0t8mYZHFifMezcruZvNb6iDeDpuY86L4dA4rieXwo7es7Hn34XFl9ha48qijkWmbOcIynj/BVA6QXMVL8FEZ5YcOB/4JxDyJKalS6Q0AaUJYTBhV2DIuE23zTsus9JseivB+s7C0EAs5Wjr40YU5oOrhUE2CCv0wKFLUIIMMPt1LOvhbvaa6hdeNntdj+t6fh7RyOoLoUaH65uAa9lhCPcV0wajtrau8Iue51Q5rSzIM4L78yu1ERZjCAgiEV1frVMQIvISypIB5S5TiOiUF5ro73toaqEACOMr7jmzpYyI7S4hlML0lADnpR7AfpFcA7y8OXa2gDzw6qVJC250rYlLnFLy+ffR/iRNRYVBB21IglPumM4eKTtOQS00/gp15osM441DTo0anTnvU/L6hz+Nn6oFaFE14SRz5UrqRqwEkNGV63r++sIlmVFnHHu9ZmcosQz7+jaGx8ocEcrCNK8hgU97pzbKLi3V/PS45YfZComv/ichpTqG8QajvHK0ZI3TRaYjmt1hTphhu3RtJMP17pc3BoqLOfUckUJP9wRzeqbP/4cAYPV7YpOL0D4LIQhJoPzYq4ytvBScOR53T+O62Mc8z/74ocklKU8OOv8G+EJSCQgHOOV16ynAC3QOvQc/zh3jfY16XvCs/vamx+HpVfZvp7oVU/2ssicQZa7pZtu1qG3rTMArb9I8mK+XsvbxxpqL8bltVZnNjqcFmuMLR5giVvmBzrmpEvDl1//LFzw0AJVR10644x02zDhHqafSLqu6W4WvEoP1B+FKHvFHKyZqm9a2zpDX/8g1hJQU9IvqMz092swLqGkzpH3+2Kc/1lDrCnWKno+oEpbr9qq1V3FBa+/fCGDClRl37Ug/bJ1VxnhX8Muq0QQvGDbN9yQItb19CzSc8rHC3jRrAP//TGOVwUuaDWuoUT3IHUeRTQO6xWOk/BVS9jTBS9oXdzi8Pkrw0s9GKG9ZHNQFSarB6ITx7QM0vP9YVPhmsF8O3bYC3gv0y8IhPPC8ICsUBBDEvgpHYRcQ8ooDaVaNdYRQ8I15tp9PrAXcHBBt0RvDpBf8PnTGP3ndUazKrSQvHhenKv5w80X9N/4Rn4CbMgsOUCJ2w2tx3lfrdU452i+/P4U5qKdDhLPfmk0pi1Q2b84edVIU7C1RNW4q5EHYU3BE+fwmtnEGznm6Plunw+P9qwbK1f1f3Fw5Ui/iC0+G6kxr++pr/HbCCXX/WQffFVV/2lS+h/7F/vmLxBPHh7pg0gdiOpo3ki4kItly3zL+w3NRkukd+ILONgg3551eu7/AxK2F7WQPNQ+AAAAAElFTkSuQmCC</Image> View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/e8c… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/e8c… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Add Tor integration and UI
by Pier Angelo Vendrame (@pierov) 14 May '24

14 May '24
Pier Angelo Vendrame pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android Commits: 7b6f9fcc by Pier Angelo Vendrame at 2024-05-14T10:14:58+02:00 fixup! Add Tor integration and UI Bug 41111 (Build): Use Lyrebird to provide WebTunnel PT Client - - - - - 1 changed file: - fenix/app/src/main/assets/common/torrc-defaults Changes: ===================================== fenix/app/src/main/assets/common/torrc-defaults ===================================== @@ -4,7 +4,6 @@ AvoidDiskWrites 1 Log notice stdout CookieAuthentication 1 DormantCanceledByStartup 1 -ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit exec ./libObfs4proxy.so +ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit,webtunnel exec ./libObfs4proxy.so ClientTransportPlugin snowflake exec ./libSnowflake.so -ClientTransportPlugin webtunnel exec ./libWebtunnel.so ClientTransportPlugin conjure exec ./libConjure.so -registerURL https://registration.refraction.network/api View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/7b6… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/7b6… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][main] MB 278: Add assets for Mullvad Browser's Windows installer.
by richard (@richard) 14 May '24

14 May '24
richard pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: 623fc4a5 by Pier Angelo Vendrame at 2024-05-14T16:43:04+02:00 MB 278: Add assets for Mullvad Browser&#39;s Windows installer. - - - - - 6 changed files: - projects/browser/windows-installer/browser-install.nsi - projects/browser/windows-installer/defines.nsh.in - + projects/browser/windows-installer/mullvadbrowser-alpha.bmp - + projects/browser/windows-installer/mullvadbrowser-nightly.bmp - + projects/browser/windows-installer/mullvadbrowser-release.bmp - − projects/browser/windows-installer/mullvadbrowser.bmp Changes: ===================================== projects/browser/windows-installer/browser-install.nsi ===================================== @@ -84,9 +84,9 @@ Function SetupType ${EndIf} SetCtlColors $0 "" "${MUI_BGCOLOR}" - ${NSD_CreateBitmap} 0 0 100% 100% "" + ${NSD_CreateBitmap} 0u 0u 109u 193u "" Pop $0 - ${NSD_SetBitmap} $0 $PLUGINSDIR\${WELCOME_IMAGE} $1 + !insertmacro MUI_INTERNAL_FULLWINDOW_LOADWIZARDIMAGE "" $0 $PLUGINSDIR\${WELCOME_IMAGE} $1 ${NSD_CreateLabel} 120u 10u 195u 28u "Welcome to the ${DISPLAY_NAME} Installer" Pop $0 ===================================== projects/browser/windows-installer/defines.nsh.in ===================================== @@ -22,7 +22,7 @@ [% ELSE -%] !define ICON_NAME "[% c('var/projectname') %].ico" [% END -%] - !define WELCOME_IMAGE "[% c('var/projectname') %].bmp" + !define WELCOME_IMAGE "[% c('var/projectname') %]-[% c('var/channel') %].bmp" [% IF c('var/mullvad-browser') -%] ; Firefox's --with-user-appdir ===================================== projects/browser/windows-installer/mullvadbrowser-alpha.bmp ===================================== Binary files /dev/null and b/projects/browser/windows-installer/mullvadbrowser-alpha.bmp differ ===================================== projects/browser/windows-installer/mullvadbrowser-nightly.bmp ===================================== Binary files /dev/null and b/projects/browser/windows-installer/mullvadbrowser-nightly.bmp differ ===================================== projects/browser/windows-installer/mullvadbrowser-release.bmp ===================================== Binary files /dev/null and b/projects/browser/windows-installer/mullvadbrowser-release.bmp differ ===================================== projects/browser/windows-installer/mullvadbrowser.bmp deleted ===================================== Binary files a/projects/browser/windows-installer/mullvadbrowser.bmp and /dev/null differ View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/6… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/6… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][main] Add jwilde entry to reviewers in default merge request template
by richard (@richard) 14 May '24

14 May '24
richard pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: 70f537ab by Richard Pospesel at 2024-05-14T12:14:44+00:00 Add jwilde entry to reviewers in default merge request template - - - - - 1 changed file: - .gitlab/merge_request_templates/default.md Changes: ===================================== .gitlab/merge_request_templates/default.md ===================================== @@ -36,17 +36,18 @@ - **android** : clairehurst, dan - **build system** : boklm - **extensions** : ma1 - - **firefox internals (XUL/JS/XPCOM)** : ma1 + - **firefox internals (XUL/JS/XPCOM)** : jwilde, ma1 - **fonts** : pierov - **frontend (implementation)** : henry - **frontend (review)** : donuts, richard - **localization** : henry, pierov - - **macos** : clairehurst, dan + - **macOS** : clairehurst, dan - **nightly builds** : boklm - **rebases/release-prep** : boklm, dan, ma1, pierov, richard - - **security** : ma1 + - **security** : jwilde, ma1 - **signing** : boklm, richard - **updater** : pierov + - **windows** : jwilde, richard - **misc/other** : pierov, richard ### Change Description View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/7… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/7… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.11.0esr-13.5-1] fixup! Adding issue and merge request templates
by richard (@richard) 14 May '24

14 May '24
richard pushed to branch mullvad-browser-115.11.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser Commits: 904de2aa by Richard Pospesel at 2024-05-14T11:57:43+00:00 fixup! Adding issue and merge request templates add jwilde to reviewer list - - - - - 1 changed file: - .gitlab/merge_request_templates/default.md Changes: ===================================== .gitlab/merge_request_templates/default.md ===================================== @@ -41,17 +41,18 @@ - **android** : clairehurst, dan - **build system** : boklm - **extensions** : ma1 - - **firefox internals (XUL/JS/XPCOM)** : ma1 + - **firefox internals (XUL/JS/XPCOM)** : jwilde, ma1 - **fonts** : pierov - **frontend (implementation)** : henry - **frontend (review)** : donuts, richard - **localization** : henry, pierov - - **macos** : clairehurst, dan + - **macOS** : clairehurst, dan - **nightly builds** : boklm - **rebases/release-prep** : dan, ma1, pierov, richard - - **security** : ma1 + - **security** : jwilde, ma1 - **signing** : boklm, richard - **updater** : pierov + - **windows** : jwilde, richard - **misc/other** : pierov, richard #### Change Description View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/904… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/904… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-115.11.0esr-13.5-1] fixup! Adding issue and merge request templates
by richard (@richard) 14 May '24

14 May '24
richard pushed to branch base-browser-115.11.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 4384bb33 by Richard Pospesel at 2024-05-14T11:56:56+00:00 fixup! Adding issue and merge request templates add jwilde to reviewer list - - - - - 1 changed file: - .gitlab/merge_request_templates/default.md Changes: ===================================== .gitlab/merge_request_templates/default.md ===================================== @@ -42,17 +42,18 @@ - **android** : clairehurst, dan - **build system** : boklm - **extensions** : ma1 - - **firefox internals (XUL/JS/XPCOM)** : ma1 + - **firefox internals (XUL/JS/XPCOM)** : jwilde, ma1 - **fonts** : pierov - **frontend (implementation)** : henry - **frontend (review)** : donuts, richard - **localization** : henry, pierov - - **macos** : clairehurst, dan + - **macOS** : clairehurst, dan - **nightly builds** : boklm - **rebases/release-prep** : dan, ma1, pierov, richard - - **security** : ma1 + - **security** : jwilde, ma1 - **signing** : boklm, richard - **updater** : pierov + - **windows** : jwilde, richard - **misc/other** : pierov, richard #### Change Description View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/4384bb3… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/4384bb3… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.11.0esr-13.5-1] fixup! Adding issue and merge request templates
by richard (@richard) 14 May '24

14 May '24
richard pushed to branch tor-browser-115.11.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 51caba94 by Richard Pospesel at 2024-05-14T11:54:30+00:00 fixup! Adding issue and merge request templates add jwilde to reviewer list - - - - - 1 changed file: - .gitlab/merge_request_templates/default.md Changes: ===================================== .gitlab/merge_request_templates/default.md ===================================== @@ -42,17 +42,18 @@ - **android** : clairehurst, dan - **build system** : boklm - **extensions** : ma1 - - **firefox internals (XUL/JS/XPCOM)** : ma1 + - **firefox internals (XUL/JS/XPCOM)** : jwilde, ma1 - **fonts** : pierov - **frontend (implementation)** : henry - **frontend (review)** : donuts, richard - **localization** : henry, pierov - - **macos** : clairehurst, dan + - **macOS** : clairehurst, dan - **nightly builds** : boklm - **rebases/release-prep** : dan, ma1, pierov, richard - - **security** : ma1 + - **security** : jwilde, ma1 - **signing** : boklm, richard - **updater** : pierov + - **windows** : jwilde, richard - **misc/other** : pierov, richard #### Change Description View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/51caba9… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/51caba9… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][main] Comment differences between locales and locales_mobile.
by Pier Angelo Vendrame (@pierov) 14 May '24

14 May '24
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: 35a864ab by Pier Angelo Vendrame at 2024-05-14T13:32:40+02:00 Comment differences between locales and locales_mobile. See tor-browser-build!967. - - - - - 1 changed file: - rbm.conf Changes: ===================================== rbm.conf ===================================== @@ -162,9 +162,11 @@ var: - fr - ga-rIE - hu + # Indonesian (id in var/locales) - in - is - it + # Modern Hebrew (he in var/locales) - iw - ja - ka View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/3… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/3… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Implement Android-native Connection Assist UI
by Dan Ballard (@dan) 14 May '24

14 May '24
Dan Ballard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android Commits: e2bd6fda by clairehurst at 2024-05-14T00:00:14+00:00 fixup! Implement Android-native Connection Assist UI - - - - - 2 changed files: - fenix/app/src/main/java/org/mozilla/fenix/tor/TorConnectionAssistFragment.kt - fenix/app/src/main/java/org/mozilla/fenix/tor/TorConnectionAssistViewModel.kt Changes: ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/TorConnectionAssistFragment.kt ===================================== @@ -62,6 +62,7 @@ class TorConnectionAssistFragment : Fragment(), UserInteractionHandler { override fun onResume() { super.onResume() hideToolbar() + viewModel.handleTorConnectStateToScreen() // Covers the case where the app is backgrounded when the bootstrap finishes } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { @@ -86,6 +87,7 @@ class TorConnectionAssistFragment : Fragment(), UserInteractionHandler { viewModel.shouldOpenHome().observe( viewLifecycleOwner, ) { + Log.d(TAG, "shouldOpenHome() = $it") if (it) { openHome() } ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/TorConnectionAssistViewModel.kt ===================================== @@ -46,6 +46,7 @@ class TorConnectionAssistViewModel( init { Log.d(TAG, "initiating TorConnectionAssistViewModel") _torController.registerTorListener(this) + handleTorConnectStateToScreen() // should cover the case of when we have an onBootStrapStateChange() event before this is initialized, which lead to being stuck on the splash screen } private fun handleConnect( @@ -95,6 +96,10 @@ class TorConnectionAssistViewModel( _progress.value = progress.toInt() } + handleTorConnectStateToScreen() + } + + fun handleTorConnectStateToScreen() { when (_torController.lastKnownStatus) { TorConnectState.Initial -> _torConnectScreen.value = ConnectAssistUiState.Splash TorConnectState.Configuring -> handleConfiguring() @@ -144,7 +149,11 @@ class TorConnectionAssistViewModel( /** stay here */ } - else -> _torConnectScreen.value = ConnectAssistUiState.Connecting + else -> _torConnectScreen.value = + ConnectAssistUiState.Connecting.also { connectAssistUiState -> + // covers the case of when the bootstrap is already in progress when the UiState "catches up" + connectAssistUiState.progress = _progress.value ?: 0 + } } } View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/e2b… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/e2b… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Enable the connect assist experiments on alpha
by Dan Ballard (@dan) 13 May '24

13 May '24
Dan Ballard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android Commits: 89ac6134 by clairehurst at 2024-05-13T23:56:04+00:00 fixup! Enable the connect assist experiments on alpha - - - - - 1 changed file: - fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt Changes: ===================================== fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt ===================================== @@ -13,6 +13,7 @@ import android.os.Build import android.os.Bundle import android.os.Handler import android.os.Looper +import android.util.Log import android.view.LayoutInflater import android.view.WindowManager import android.widget.Toast @@ -40,7 +41,6 @@ import mozilla.components.concept.sync.Profile import mozilla.components.service.glean.private.NoExtras import mozilla.components.support.ktx.android.view.showKeyboard import org.mozilla.fenix.BrowserDirection -import org.mozilla.fenix.BuildConfig import org.mozilla.fenix.Config import org.mozilla.fenix.FeatureFlags import org.mozilla.fenix.GleanMetrics.Addons @@ -49,6 +49,7 @@ import org.mozilla.fenix.GleanMetrics.Events import org.mozilla.fenix.GleanMetrics.TrackingProtection import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.R +import org.mozilla.fenix.ReleaseChannel import org.mozilla.fenix.components.accounts.FenixFxAEntryPoint import org.mozilla.fenix.databinding.AmoCollectionOverrideDialogBinding import org.mozilla.fenix.ext.application @@ -59,6 +60,7 @@ import org.mozilla.fenix.ext.openSetDefaultBrowserOption import org.mozilla.fenix.ext.requireComponents import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.showToolbar +import org.mozilla.fenix.gecko.GeckoProvider import org.mozilla.fenix.nimbus.FxNimbus import org.mozilla.fenix.perf.ProfilerViewModel import org.mozilla.fenix.settings.account.AccountUiView @@ -66,6 +68,7 @@ import org.mozilla.fenix.tor.QuickStartPreference import org.mozilla.fenix.tor.TorBridgeTransportConfig import org.mozilla.fenix.tor.TorEvents import org.mozilla.fenix.utils.Settings +import org.mozilla.geckoview.BuildConfig import kotlin.system.exitProcess @Suppress("LargeClass", "TooManyFunctions") @@ -741,7 +744,7 @@ class SettingsFragment : PreferenceFragmentCompat() { requirePreference<Preference>(R.string.pref_key_use_html_connection_ui).apply { onPreferenceChangeListener = object : SharedPreferenceUpdater() {} - isVisible = BuildConfig.DEBUG + isVisible = Config.channel != ReleaseChannel.Release } requirePreference<Preference>(R.string.pref_key_tor_logs).apply { View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/89a… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/89a… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Add Tor integration and UI
by Dan Ballard (@dan) 13 May '24

13 May '24
Dan Ballard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android Commits: cf78d7f5 by clairehurst at 2024-05-13T14:35:02-07:00 fixup! Add Tor integration and UI - - - - - 18 changed files: - fenix/app/src/main/AndroidManifest.xml - fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt - fenix/app/src/main/java/org/mozilla/fenix/components/Components.kt - − fenix/app/src/main/java/org/mozilla/fenix/tor/TorBootstrapFragment.kt - fenix/app/src/main/java/org/mozilla/fenix/tor/TorController.kt - − fenix/app/src/main/java/org/mozilla/fenix/tor/TorControllerTAS.kt - − fenix/app/src/main/java/org/mozilla/fenix/tor/controller/TorBootstrapController.kt - − fenix/app/src/main/java/org/mozilla/fenix/tor/interactor/TorBootstrapInteractor.kt - − fenix/app/src/main/java/org/mozilla/fenix/tor/view/TorBootstrapAdapter.kt - − fenix/app/src/main/java/org/mozilla/fenix/tor/view/TorBootstrapConnectViewHolder.kt - − fenix/app/src/main/java/org/mozilla/fenix/tor/view/TorBootstrapLoggerViewHolder.kt - − fenix/app/src/main/java/org/mozilla/fenix/tor/view/TorBootstrapPagerAdapter.kt - − fenix/app/src/main/java/org/mozilla/fenix/tor/view/TorBootstrapPagerViewHolder.kt - − fenix/app/src/main/java/org/mozilla/fenix/tor/view/TorBootstrapView.kt - − fenix/app/src/main/res/drawable/ic_tor_connect_computer_graphic.xml - − fenix/app/src/main/res/layout/tor_bootstrap_connect.xml - − fenix/app/src/main/res/layout/tor_bootstrap_logger.xml - − fenix/app/src/main/res/layout/tor_bootstrap_pager.xml Changes: ===================================== fenix/app/src/main/AndroidManifest.xml ===================================== @@ -367,12 +367,6 @@ tools:node="remove" /> </provider> <!-- Define Orbotservice's TorService --> - <service - android:name="org.torproject.android.service.TorService" - android:enabled="true" - android:exported="false" - android:stopWithTask="true"> - </service> </application> </manifest> ===================================== fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt ===================================== @@ -103,7 +103,6 @@ import org.mozilla.fenix.utils.Settings.Companion.TOP_SITES_PROVIDER_MAX_THRESHO import org.mozilla.fenix.wallpapers.Wallpaper import java.util.UUID import java.util.concurrent.TimeUnit -import org.torproject.android.service.util.Prefs /** *The main application class for Fenix. Records data to measure initialization performance. @@ -234,8 +233,8 @@ open class FenixApplication : LocaleAwareApplication(), Provider { Log.addSink(FenixLogSink(logsDebug = Config.channel.isDebug, AndroidLogSink())) } - @OptIn(DelicateCoroutinesApi::class) // GlobalScope usage - open fun setupInMainProcessOnly() { + @VisibleForTesting + protected open fun setupInMainProcessOnly() { ProfilerMarkerFactProcessor.create { components.core.engine.profiler }.register() run { @@ -273,11 +272,6 @@ open class FenixApplication : LocaleAwareApplication(), Provider { if (!megazordSetup.isCompleted) { runBlockingIncrement { megazordSetup.await() } } - - GlobalScope.launch(Dispatchers.IO) { - // Give TAS the base Context - Prefs.setContext(applicationContext) - } } setupLeakCanary() ===================================== fenix/app/src/main/java/org/mozilla/fenix/components/Components.kt ===================================== @@ -44,7 +44,6 @@ import org.mozilla.fenix.perf.StartupStateProvider import org.mozilla.fenix.perf.StrictModeManager import org.mozilla.fenix.perf.lazyMonitored import org.mozilla.fenix.tor.TorControllerGV -import org.mozilla.fenix.tor.TorControllerTAS import org.mozilla.fenix.utils.ClipboardHandler import org.mozilla.fenix.utils.Settings import org.mozilla.fenix.wifi.WifiConnectionMonitor ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/TorBootstrapFragment.kt deleted ===================================== @@ -1,197 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.fenix.tor - -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import androidx.core.view.children -import androidx.fragment.app.Fragment -import androidx.lifecycle.lifecycleScope -import org.mozilla.fenix.BuildConfig -import org.mozilla.fenix.databinding.FragmentHomeBinding -import org.mozilla.fenix.ext.requireComponents -import org.mozilla.fenix.tor.interactor.DefaultTorBootstrapInteractor -import org.mozilla.fenix.tor.interactor.TorBootstrapInteractor -import androidx.navigation.fragment.findNavController -import com.google.android.material.appbar.AppBarLayout -import org.mozilla.fenix.HomeActivity -import org.mozilla.fenix.R -import org.mozilla.fenix.ext.components -import org.mozilla.fenix.ext.hideToolbar -import org.mozilla.fenix.ext.settings -import org.mozilla.fenix.tor.controller.DefaultTorBootstrapController -import org.mozilla.fenix.tor.view.TorBootstrapView - - -@Suppress("TooManyFunctions", "LargeClass") -class TorBootstrapFragment : Fragment() { - - internal var _binding: FragmentHomeBinding? = null - private val binding get() = _binding!! - - - private var torBootstrapView: TorBootstrapView? = null - - private var _torBootstrapInteractor: TorBootstrapInteractor? = null - private val torBootstrapInteractor: TorBootstrapInteractor - get() = _torBootstrapInteractor!! - - private lateinit var torBootstrapStatus: TorBootstrapStatus - - - @Suppress("LongMethod") - override fun onCreateView( - inflater: LayoutInflater, - container: ViewGroup?, - savedInstanceState: Bundle?, - ): View { - _binding = FragmentHomeBinding.inflate(inflater, container, false) - val components = requireComponents - - torBootstrapStatus = TorBootstrapStatus( - !BuildConfig.DISABLE_TOR, - components.torController, - ::dispatchModeChanges - ) - - if (!torBootstrapStatus.isBootstrapping()) { - openHome() - } - - // Was _sessionControlInteractor - _torBootstrapInteractor = DefaultTorBootstrapInteractor( - controller = DefaultTorBootstrapController( - handleTorBootstrapConnect = ::handleTorBootstrapConnect, - cancelTorBootstrap = ::cancelTorBootstrap, - initiateTorBootstrap = ::initiateTorBootstrap, - openTorNetworkSettings = ::openTorNetworkSettings - ), - ) - - torBootstrapView = TorBootstrapView( - containerView = binding.sessionControlRecyclerView, - viewLifecycleOwner = viewLifecycleOwner, - interactor = torBootstrapInteractor, - ) - - adjustHomeFragmentView() - updateSessionControlView() - showSessionControlView() - - return binding.root - } - - private fun updateSessionControlView() { - torBootstrapView?.update(requireContext().components.appStore.state) - } - - // This function should be paired with showSessionControlView() - private fun adjustHomeFragmentView() { - binding.sessionControlRecyclerView.apply { - visibility = View.INVISIBLE - } - - binding.sessionControlRecyclerView.apply { - setPadding(0, 0, 0, 0) - (layoutParams as ViewGroup.MarginLayoutParams).setMargins(0, 0, 0, 0) - } - - binding.homeAppBar.apply { - visibility = View.GONE - - // Reset this as SCROLL in case it was previously set as NO_SCROLL after bootstrap - children.forEach { - (it.layoutParams as AppBarLayout.LayoutParams).scrollFlags = - AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL - } - } - binding.onionPatternImage.apply { - visibility = View.GONE - } - binding.toolbarLayout.apply { - visibility = View.GONE - } - } - - // This function should be paired with adjustHomeFragmentView() - private fun showSessionControlView() { - binding.sessionControlRecyclerView.apply { - visibility = View.VISIBLE - } - } - - private fun dispatchModeChanges(isBootstrapping: Boolean) { - //requireComponents.appStore.dispatch(AppAction.ModeChange(mode)) - if (!isBootstrapping) { - openHome() - } else { - adjustHomeFragmentView() - updateSessionControlView() - showSessionControlView() - } - } - - override fun onStop() { - super.onStop() - torBootstrapStatus.unregisterTorListener() - } - - override fun onResume() { - super.onResume() - - torBootstrapStatus.registerTorListener() - - // fenix#40176: Ensure the Home fragment is rendered correctly when we resume. - val isBootstraping = torBootstrapStatus.isBootstrapping() - - if (!isBootstraping) { - openHome() - } - - adjustHomeFragmentView() - updateSessionControlView() - showSessionControlView() - - hideToolbar() - - // Whenever a tab is selected its last access timestamp is automatically updated by A-C. - // However, in the case of resuming the app to the home fragment, we already have an - // existing selected tab, but its last access timestamp is outdated. No action is - // triggered to cause an automatic update on warm start (no tab selection occurs). So we - // update it manually here. - requireComponents.useCases.sessionUseCases.updateLastAccess() - (requireActivity() as HomeActivity).navigateToHome() - } - - private fun handleTorBootstrapConnect() { - requireComponents.torController.onTorConnecting() - } - - private fun cancelTorBootstrap() { - requireComponents.torController.stopTor() - } - - private fun initiateTorBootstrap(withDebugLogging: Boolean = false) { - requireComponents.torController.initiateTorBootstrap(lifecycleScope, withDebugLogging) - } - - private fun openTorNetworkSettings() { - val directions = - TorBootstrapFragmentDirections.actionTorbootstrapFragmentToSettingsFragment( - requireContext().getString(R.string.pref_key_connection) - ) - findNavController().navigate(directions) - } - - private fun openHome() { - val directions = - TorBootstrapFragmentDirections - .actionStartupHome() - findNavController().navigate(directions) - } - -} ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/TorController.kt ===================================== @@ -29,25 +29,6 @@ internal enum class TorStatus(val status: String) { ON("ON"), STOPPING("STOPPING"), UNKNOWN("UNKNOWN"); - - companion object { - fun fromString(status: String): TorStatus { - return when (status) { - "ON" -> ON - "STARTING" -> STARTING - "STOPPING" -> STOPPING - "OFF" -> OFF - else -> UNKNOWN - } - } - } - - fun isOff() = this == OFF - fun isOn() = this == ON - fun isStarting() = this == STARTING - fun isStarted() = ((this == STARTING) || (this == ON)) - fun isStopping() = this == STOPPING - fun isUnknown() = this == UNKNOWN } interface TorController: TorEvents { ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/TorControllerTAS.kt deleted ===================================== @@ -1,342 +0,0 @@ -package org.mozilla.fenix.tor - -import android.content.BroadcastReceiver -import android.content.Context -import android.content.Intent -import android.content.IntentFilter -import androidx.lifecycle.LifecycleCoroutineScope -import androidx.localbroadcastmanager.content.LocalBroadcastManager -import kotlinx.coroutines.channels.Channel -import kotlinx.coroutines.launch -import kotlinx.coroutines.withTimeoutOrNull -import org.mozilla.fenix.BuildConfig -import org.torproject.android.service.TorService -import org.torproject.android.service.TorServiceConstants -import org.torproject.android.service.util.Prefs - -@SuppressWarnings("TooManyFunctions") -class TorControllerTAS (private val context: Context): TorController { - private val lbm: LocalBroadcastManager = LocalBroadcastManager.getInstance(context) - private val entries = mutableListOf<Pair<String?, String?>>() - override val logEntries get() = entries - override var quickstart: Boolean = false // Stub, is never used - - private var torListeners = mutableListOf<TorEvents>() - - private var pendingRegisterChangeList = mutableListOf<Pair<TorEvents, Boolean>>() - private var lockTorListenersMutation = false - - private var lastKnownStatus = TorStatus.OFF - private var wasTorBootstrapped = false - private var isTorRestarting = false - - // This may be a lie - private var isTorBootstrapped = false - get() = ((lastKnownStatus == TorStatus.ON) && wasTorBootstrapped) - - val isDebugLoggingEnabled get() = - context - .getSharedPreferences("org.torproject.android_preferences", Context.MODE_PRIVATE) - .getBoolean("pref_enable_logging", false) - - override val isStarting get() = lastKnownStatus.isStarting() - override val isRestarting get() = isTorRestarting - override val isBootstrapped get() = isTorBootstrapped - override val isConnected get() = (lastKnownStatus.isStarted() && !isTorRestarting) - - override var bridgesEnabled: Boolean - get() = Prefs.bridgesEnabled() - set(value) { Prefs.putBridgesEnabled(value) } - - override var bridgeTransport: TorBridgeTransportConfig - get() { - return TorBridgeTransportConfigUtil.getStringToBridgeTransport( - Prefs.getBridgesList() - ) - } - set(value) { - if (value == TorBridgeTransportConfig.USER_PROVIDED) { - // Don't set the pref when the value is USER_PROVIDED because - // "user_provided" is not a valid bridge or transport type. - // This call should be followed by setting userProvidedBridges. - return - } - Prefs.setBridgesList(value.transportName) - } - - override var userProvidedBridges: String? - get() { - val bridges = Prefs.getBridgesList() - val bridgeType = - TorBridgeTransportConfigUtil.getStringToBridgeTransport(bridges) - return when (bridgeType) { - TorBridgeTransportConfig.USER_PROVIDED -> bridges - else -> null - } - } - set(value) { - Prefs.setBridgesList(value) - } - - override fun start() { - // Register receiver - lbm.registerReceiver( - persistentBroadcastReceiver, - IntentFilter(TorServiceConstants.ACTION_STATUS) - ) - lbm.registerReceiver( - persistentBroadcastReceiver, - IntentFilter(TorServiceConstants.LOCAL_ACTION_LOG) - ) - } - - override fun stop() { - lbm.unregisterReceiver(persistentBroadcastReceiver) - } - - private val persistentBroadcastReceiver = object : BroadcastReceiver() { - override fun onReceive(context: Context, intent: Intent) { - if (intent.action == null || - (intent.action != TorServiceConstants.ACTION_STATUS && - intent.action != TorServiceConstants.LOCAL_ACTION_LOG) - ) { - return - } - val action = intent.action - - val logentry: String? - val status: String? - if (action == TorServiceConstants.LOCAL_ACTION_LOG) { - logentry = intent.getExtras() - ?.getCharSequence(TorServiceConstants.LOCAL_EXTRA_LOG) as? String? - } else { - logentry = null - } - - status = intent.getExtras() - ?.getCharSequence(TorServiceConstants.EXTRA_STATUS) as? String? - - if (logentry == null && status == null) { - return - } - - onTorStatusUpdate(logentry, status) - - if (status == null) { - return - } - - val newStatus = TorStatus.fromString(status) - - if (newStatus.isUnknown() && wasTorBootstrapped) { - stopTor() - } - - entries.add(Pair(logentry, status)) - - if (logentry != null && logentry.contains(TorServiceConstants.TOR_CONTROL_PORT_MSG_BOOTSTRAP_DONE)) { - wasTorBootstrapped = true - onTorConnected() - } - - if (lastKnownStatus.isStopping() && newStatus.isOff()) { - if (isTorRestarting) { - initiateTorBootstrap() - } else { - onTorStopped() - } - } - - if (lastKnownStatus.isOff() && newStatus.isStarting()) { - isTorRestarting = false - } - - lastKnownStatus = newStatus - } - } - - override fun onTorConnecting() { - lockTorListenersMutation = true - torListeners.forEach { it.onTorConnecting() } - lockTorListenersMutation = false - - handlePendingRegistrationChanges() - } - - override fun onTorConnected() { - lockTorListenersMutation = true - torListeners.forEach { it.onTorConnected() } - lockTorListenersMutation = false - - handlePendingRegistrationChanges() - } - - override fun onTorStatusUpdate(entry: String?, status: String?, progress: Double?) { - lockTorListenersMutation = true - torListeners.forEach { it.onTorStatusUpdate(entry, status) } - lockTorListenersMutation = false - - handlePendingRegistrationChanges() - } - - override fun onTorStopped() { - lockTorListenersMutation = true - torListeners.forEach { it.onTorStopped() } - lockTorListenersMutation = false - - handlePendingRegistrationChanges() - } - - override fun registerTorListener(l: TorEvents) { - if (torListeners.contains(l)) { - return - } - - if (lockTorListenersMutation) { - pendingRegisterChangeList.add(Pair(l, true)) - } else { - torListeners.add(l) - } - } - - override fun unregisterTorListener(l: TorEvents) { - if (!torListeners.contains(l)) { - return - } - - if (lockTorListenersMutation) { - pendingRegisterChangeList.add(Pair(l, false)) - } else { - torListeners.remove(l) - } - } - - override fun registerTorLogListener(l: TorLogs) {} - override fun unregisterTorLogListener(l: TorLogs) {} - - private fun handlePendingRegistrationChanges() { - pendingRegisterChangeList.forEach { - if (it.second) { - registerTorListener(it.first) - } else { - unregisterTorListener(it.first) - } - } - - pendingRegisterChangeList.clear() - } - - /** - * Receive the current Tor status. - * - * Send a request for the current status and receive the response. - * Returns true if Tor is running, false otherwise. - * - */ - private suspend fun checkTorIsStarted(): Boolean { - val channel = Channel<Boolean>() - - // Register receiver - val lbm: LocalBroadcastManager = LocalBroadcastManager.getInstance(context) - val localBroadcastReceiver = object : BroadcastReceiver() { - override fun onReceive(context: Context, intent: Intent) { - val action = intent.action ?: return - // We only want ACTION_STATUS messages - if (action != TorServiceConstants.ACTION_STATUS) { - return - } - // The current status has the EXTRA_STATUS key - val currentStatus = - intent.getStringExtra(TorServiceConstants.EXTRA_STATUS) - channel.trySend(currentStatus === TorServiceConstants.STATUS_ON) - } - } - lbm.registerReceiver( - localBroadcastReceiver, - IntentFilter(TorServiceConstants.ACTION_STATUS) - ) - - // Request service status - sendServiceAction(TorServiceConstants.ACTION_STATUS) - - // Wait for response and unregister receiver - var torIsStarted = false - withTimeoutOrNull(torServiceResponseTimeout) { - torIsStarted = channel.receive() - } - lbm.unregisterReceiver(localBroadcastReceiver) - return torIsStarted - } - - override fun initiateTorBootstrap(lifecycleScope: LifecycleCoroutineScope?, withDebugLogging: Boolean) { - if (BuildConfig.DISABLE_TOR) { - return - } - - context.getSharedPreferences("org.torproject.android_preferences", Context.MODE_PRIVATE) - .edit().putBoolean("pref_enable_logging", withDebugLogging).apply() - - if (lifecycleScope == null) { - sendServiceAction(TorServiceConstants.ACTION_START) - } else { - lifecycleScope.launch { - val torNeedsStart = !checkTorIsStarted() - if (torNeedsStart) { - sendServiceAction(TorServiceConstants.ACTION_START) - } - } - } - } - - override fun stopTor() { - if (BuildConfig.DISABLE_TOR) { - return - } - - val torService = Intent(context, TorService::class.java) - context.stopService(torService) - } - - override fun setTorStopped() { - lastKnownStatus = TorStatus.OFF - onTorStopped() - } - - override fun restartTor() { - // tor-android-service doesn't dynamically update the torrc file, - // and it doesn't use SETCONF, so we completely restart the service. - // However, don't restart if we aren't started and we weren't - // previously started. - if (!lastKnownStatus.isStarted() && !wasTorBootstrapped) { - return - } - - if (!lastKnownStatus.isStarted() && wasTorBootstrapped) { - // If we aren't started, but we were previously bootstrapped, - // then we handle a "restart" request as a "start" restart - initiateTorBootstrap() - } else { - // |isTorRestarting| tracks the state of restart. When we receive an |OFF| state - // from TorService in persistentBroadcastReceiver::onReceive we restart the Tor - // service. - isTorRestarting = true - stopTor() - } - } - - private fun sendServiceAction(action: String) { - val torServiceStatus = Intent(context, TorService::class.java) - torServiceStatus.action = action - context.startService(torServiceStatus) - } - - companion object { - const val torServiceResponseTimeout = 5000L - } - - // Compat with TorControlGV Stubs - - override fun getLastErrorState() : TorError? { - return null; - } -} ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/controller/TorBootstrapController.kt deleted ===================================== @@ -1,63 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.fenix.tor.controller - -import org.mozilla.fenix.tor.interactor.TorBootstrapInteractor - -interface TorBootstrapController { - /** - * @see [TorBootstrapInteractor.onTorBootstrapConnectClicked] - */ - fun handleTorBootstrapConnectClicked() - - /** - * @see [TorBootstrapInteractor.onTorStopBootstrapping] - */ - fun handleTorStopBootstrapping() - - /** - * @see [TorBootstrapInteractor.onTorStartBootstrapping] - */ - fun handleTorStartBootstrapping() - - /** - * @see [TorBootstrapInteractor.onTorStartDebugBootstrapping] - */ - fun handleTorStartDebugBootstrapping() - - /** - * @see [TorBootstrapInteractor.onTorBootstrapNetworkSettingsClicked] - */ - fun handleTorNetworkSettingsClicked() - - -} - -class DefaultTorBootstrapController( - private val handleTorBootstrapConnect: () -> Unit, - private val initiateTorBootstrap: (Boolean) -> Unit, - private val cancelTorBootstrap: () -> Unit, - private val openTorNetworkSettings: () -> Unit -) : TorBootstrapController { - override fun handleTorBootstrapConnectClicked() { - handleTorBootstrapConnect() - } - - override fun handleTorStopBootstrapping() { - cancelTorBootstrap() - } - - override fun handleTorStartBootstrapping() { - initiateTorBootstrap(false) - } - - override fun handleTorStartDebugBootstrapping() { - initiateTorBootstrap(true) - } - - override fun handleTorNetworkSettingsClicked() { - openTorNetworkSettings() - } -} ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/interactor/TorBootstrapInteractor.kt deleted ===================================== @@ -1,60 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.fenix.tor.interactor - -import org.mozilla.fenix.tor.controller.TorBootstrapController - -interface TorBootstrapInteractor { - /** - * Initiates Tor bootstrapping. Called when a user clicks on the "Connect" button. - */ - fun onTorBootstrapConnectClicked() - - /** - * Initiates Tor bootstrapping. Called when a user clicks on the "Connect" button. - */ - fun onTorStartBootstrapping() - - /** - * Stop Tor bootstrapping. Called when a user clicks on the "settings" cog/button. - */ - fun onTorStopBootstrapping() - - /** - * Initiates Tor bootstrapping with debug logging. Called when bootstrapping fails with - * the control.txt file not existing. - */ - fun onTorStartDebugBootstrapping() - - /** - * Open Tor Network Settings preference screen - */ - fun onTorBootstrapNetworkSettingsClicked() -} - -class DefaultTorBootstrapInteractor( - private val controller: TorBootstrapController, -) : TorBootstrapInteractor { - - override fun onTorBootstrapConnectClicked() { - controller.handleTorBootstrapConnectClicked() - } - - override fun onTorStopBootstrapping() { - controller.handleTorStopBootstrapping() - } - - override fun onTorStartBootstrapping() { - controller.handleTorStartBootstrapping() - } - - override fun onTorStartDebugBootstrapping() { - controller.handleTorStartDebugBootstrapping() - } - - override fun onTorBootstrapNetworkSettingsClicked() { - controller.handleTorNetworkSettingsClicked() - } -} ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/view/TorBootstrapAdapter.kt deleted ===================================== @@ -1,83 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.fenix.tor.view - -import android.view.LayoutInflater -import android.view.ViewGroup -import androidx.annotation.LayoutRes -import androidx.lifecycle.LifecycleOwner -import androidx.recyclerview.widget.DiffUtil -import androidx.recyclerview.widget.ListAdapter -import androidx.recyclerview.widget.RecyclerView -import org.mozilla.fenix.components.Components -import org.mozilla.fenix.home.topsites.TopSitePagerViewHolder -import org.mozilla.fenix.tor.interactor.TorBootstrapInteractor - -sealed class AdapterItem(@LayoutRes val viewType: Int) { - object TorBootstrap : AdapterItem(TorBootstrapPagerViewHolder.LAYOUT_ID) - - - open fun sameAs(other: AdapterItem) = this::class == other::class - open fun getChangePayload(newItem: AdapterItem): Any? = null - open fun contentsSameAs(other: AdapterItem) = this::class == other::class - -} - -class AdapterItemDiffCallback : DiffUtil.ItemCallback<AdapterItem>() { - override fun areItemsTheSame(oldItem: AdapterItem, newItem: AdapterItem) = - oldItem.sameAs(newItem) - - @Suppress("DiffUtilEquals") - override fun areContentsTheSame(oldItem: AdapterItem, newItem: AdapterItem) = - oldItem.contentsSameAs(newItem) - - override fun getChangePayload(oldItem: AdapterItem, newItem: AdapterItem): Any? { - return oldItem.getChangePayload(newItem) ?: return super.getChangePayload(oldItem, newItem) - } -} - - - -class TorBootstrapAdapter( - private val interactor: TorBootstrapInteractor, - private val viewLifecycleOwner: LifecycleOwner, - private val components: Components, -) : ListAdapter<AdapterItem, RecyclerView.ViewHolder>(AdapterItemDiffCallback()) { - - // This method triggers the ComplexMethod lint error when in fact it's quite simple. - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { - val view = LayoutInflater.from(parent.context).inflate(viewType, parent, false) - return when (viewType) { - TorBootstrapPagerViewHolder.LAYOUT_ID -> TorBootstrapPagerViewHolder( - view, - components, - interactor - ) - else -> throw IllegalStateException() - } - } - - override fun getItemViewType(position: Int) = getItem(position).viewType - - override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int, payloads: MutableList<Any>) { - if (payloads.isEmpty()) { - onBindViewHolder(holder, position) - } else { - when (holder) { - is TopSitePagerViewHolder -> { - if (payloads[0] is org.mozilla.fenix.home.sessioncontrol.AdapterItem.TopSitePagerPayload) { - val payload = payloads[0] as org.mozilla.fenix.home.sessioncontrol.AdapterItem.TopSitePagerPayload - holder.update(payload) - } - } - } - } - } - - override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { - // no-op. This ViewHolder receives the HomeStore as argument and will observe that - // without the need for us to manually update from here the data to be displayed. - } -} ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/view/TorBootstrapConnectViewHolder.kt deleted ===================================== @@ -1,89 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.fenix.tor.view - -import android.view.View -import androidx.recyclerview.widget.RecyclerView -import org.mozilla.fenix.R -import org.mozilla.fenix.components.Components -import org.mozilla.fenix.databinding.TorBootstrapConnectBinding -import org.mozilla.fenix.tor.TorEvents -import org.mozilla.fenix.tor.interactor.TorBootstrapInteractor - -class TorBootstrapConnectViewHolder( - private val view: View, - private val components: Components, - private val interactor: TorBootstrapInteractor -) : RecyclerView.ViewHolder(view), TorEvents { - - var binding: TorBootstrapConnectBinding - - init { - binding = TorBootstrapConnectBinding.bind(view) - - with(binding.torBootstrapNetworkSettingsButton) { - setOnClickListener { - interactor.onTorStopBootstrapping() - interactor.onTorBootstrapNetworkSettingsClicked() - - with(binding.torBootstrapProgress) { - visibility = View.INVISIBLE - } - - with(binding.torBootstrapConnectButton) { - visibility = View.VISIBLE - } - } - } - - with(binding.torBootstrapConnectButton) { - setOnClickListener { - interactor.onTorBootstrapConnectClicked() - interactor.onTorStartBootstrapping() - - visibility = View.INVISIBLE - - with(binding.torBootstrapProgress) { - visibility = View.VISIBLE - } - } - } - - components.torController.registerTorListener(this) - } - - @SuppressWarnings("EmptyFunctionBlock") - override fun onTorConnecting() { - } - - override fun onTorConnected() { - components.torController.unregisterTorListener(this) - } - - @SuppressWarnings("EmptyFunctionBlock") - override fun onTorStopped() { - } - - override fun onTorStatusUpdate(entry: String?, status: String?, progress: Double?) { - if (entry == null) return - - binding.torBootstrapStatusMessage.text = entry - if (entry.startsWith(BOOTSTRAPPED_PREFIX)) { - val percentIdx = entry.indexOf("%") - val percent = entry.substring( - BOOTSTRAPPED_PREFIX.length, - percentIdx - ) - with(binding.torBootstrapProgress) { - this.progress = percent.toInt() - } - } - } - - companion object { - const val LAYOUT_ID = R.layout.tor_bootstrap_connect - const val BOOTSTRAPPED_PREFIX = "NOTICE: Bootstrapped " - } -} ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/view/TorBootstrapLoggerViewHolder.kt deleted ===================================== @@ -1,76 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.fenix.tor.view - -import android.text.method.ScrollingMovementMethod -import android.view.View -import androidx.recyclerview.widget.RecyclerView -import org.mozilla.fenix.R -import org.mozilla.fenix.components.Components -import org.mozilla.fenix.databinding.TorBootstrapLoggerBinding -import org.mozilla.fenix.tor.TorEvents - -class TorBootstrapLoggerViewHolder( - private val view: View, - private val components: Components - ) : RecyclerView.ViewHolder(view), TorEvents { - - private var entries = mutableListOf<String>() - private var binding: TorBootstrapLoggerBinding - - init { - binding = TorBootstrapLoggerBinding.bind(view) - components.torController.registerTorListener(this) - - val currentEntries = components.torController.logEntries - .filter { it.first != null } - .filter { !(it.first!!.startsWith("Circuit") && it.second == "ON") } - // Keep synchronized with format in onTorStatusUpdate - .flatMap { listOf("(${it.second}) '${it.first}'") } - val entriesLen = currentEntries.size - val subListOffset = if (entriesLen > MAX_NEW_ENTRIES) MAX_NEW_ENTRIES else entriesLen - entries = currentEntries.subList((entriesLen - subListOffset), entriesLen) as MutableList<String> - val initLog = "---------------" + view.resources.getString(R.string.tor_initializing_log) + "---------------" - entries.add(0, initLog) - - with(binding.torBootstrapLogEntries) { - movementMethod = ScrollingMovementMethod() - text = formatLogEntries(entries) - } - } - - private fun formatLogEntries(entries: List<String>) = entries.joinToString("\n") - - @SuppressWarnings("EmptyFunctionBlock") - override fun onTorConnecting() { - } - - override fun onTorConnected() { - components.torController.unregisterTorListener(this) - } - - @SuppressWarnings("EmptyFunctionBlock") - override fun onTorStopped() { - } - - override fun onTorStatusUpdate(entry: String?, status: String?, progress: Double?) { - if (status == null || entry == null) return - if (status == "ON" && entry.startsWith("Circuit")) return - - if (entries.size > MAX_LINES) { - entries = entries.drop(1) as MutableList<String> - } - entries.add("($status) '$entry'") - - binding.torBootstrapLogEntries.text = formatLogEntries(entries) - } - - companion object { - const val LAYOUT_ID = R.layout.tor_bootstrap_logger - const val MAX_NEW_ENTRIES = 24 - const val MAX_LINES = 25 - } - -} ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/view/TorBootstrapPagerAdapter.kt deleted ===================================== @@ -1,43 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.fenix.tor.view - -import android.view.LayoutInflater -import android.view.ViewGroup -import androidx.recyclerview.widget.RecyclerView -import org.mozilla.fenix.components.Components -import org.mozilla.fenix.tor.interactor.TorBootstrapInteractor - -class TorBootstrapPagerAdapter( - private val components: Components, - private val interactor: TorBootstrapInteractor -) : RecyclerView.Adapter<RecyclerView.ViewHolder>() { - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { - if (viewType == BOOTSTRAP_UI_PAGE_TYPE) { - val viewDVH = LayoutInflater.from(parent.context) - .inflate(TorBootstrapConnectViewHolder.LAYOUT_ID, parent, false) - return TorBootstrapConnectViewHolder(viewDVH, components, interactor) - } else { - val viewLVH = LayoutInflater.from(parent.context) - .inflate(TorBootstrapLoggerViewHolder.LAYOUT_ID, parent, false) - return TorBootstrapLoggerViewHolder(viewLVH, components) - } - } - - @SuppressWarnings("EmptyFunctionBlock") - override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { - } - - override fun getItemViewType(position: Int): Int = position - - override fun getItemCount(): Int = BOOTSTRAP_PAGE_COUNT - - companion object { - const val BOOTSTRAP_UI_PAGE_TYPE = 0 - const val BOOTSTRAP_LOG_PAGE_TYPE = 1 - const val BOOTSTRAP_PAGE_COUNT = 2 - } -} ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/view/TorBootstrapPagerViewHolder.kt deleted ===================================== @@ -1,32 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.fenix.tor.view - -import android.view.View -import androidx.recyclerview.widget.RecyclerView -import org.mozilla.fenix.R -import org.mozilla.fenix.components.Components -import org.mozilla.fenix.databinding.TorBootstrapPagerBinding -import org.mozilla.fenix.tor.interactor.TorBootstrapInteractor - -class TorBootstrapPagerViewHolder( - view: View, - components: Components, - interactor: TorBootstrapInteractor - ) : RecyclerView.ViewHolder(view) { - - private val bootstrapPagerAdapter = TorBootstrapPagerAdapter(components, interactor) - - init { - val binding = TorBootstrapPagerBinding.bind(view) - binding.bootstrapPager.apply { - adapter = bootstrapPagerAdapter - } - } - - companion object { - const val LAYOUT_ID = R.layout.tor_bootstrap_pager - } -} ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/view/TorBootstrapView.kt deleted ===================================== @@ -1,49 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.fenix.tor.view - -import androidx.lifecycle.LifecycleOwner -import androidx.recyclerview.widget.LinearLayoutManager -import androidx.recyclerview.widget.RecyclerView -import org.mozilla.fenix.components.appstate.AppState -import org.mozilla.fenix.ext.components -import org.mozilla.fenix.tor.interactor.TorBootstrapInteractor - - -class TorBootstrapView( - containerView: RecyclerView, - viewLifecycleOwner: LifecycleOwner, - interactor: TorBootstrapInteractor, -) { - - val view: RecyclerView = containerView //as RecyclerView - - private fun bootstrapAdapterItems() = listOf(AdapterItem.TorBootstrap) - - private val torBootstrapAdapter = TorBootstrapAdapter( - interactor, - viewLifecycleOwner, - containerView.context.components, - ) - - //private val torBootstrapAdapter = - // TorBootstrapAdapter(interactor, containerView.context.components) - //private val torBootstrapAdapter = TorBootstrapPagerAdapter(containerView.context.components, interactor) - - init { - containerView.apply { - adapter = torBootstrapAdapter - layoutManager = LinearLayoutManager(containerView.context) - } - } - - private fun AppState.toAdapterList(): List<AdapterItem> { - return bootstrapAdapterItems() - } - - fun update(state: AppState) { - torBootstrapAdapter.submitList(state.toAdapterList()) - } -} ===================================== fenix/app/src/main/res/drawable/ic_tor_connect_computer_graphic.xml deleted ===================================== @@ -1,506 +0,0 @@ -<vector xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:aapt="http://schemas.android.com/aapt" - android:width="302dp" - android:height="263dp" - android:viewportWidth="302" - android:viewportHeight="263"> - <path - android:pathData="M279.49,222.64l-94.22,-0l-0,-79.61l94.22,-0z" - android:strokeWidth="1" - android:fillType="nonZero" - android:strokeColor="#00000000"> - <aapt:attr name="android:fillColor"> - <gradient - android:startY="203.70642" - android:startX="231.9" - android:endY="160.04314" - android:endX="232.90999" - android:type="linear"> - <item android:offset="0.08" android:color="#FF7E4696"/> - <item android:offset="0.39" android:color="#9B7E4696"/> - <item android:offset="0.85" android:color="#007E4696"/> - </gradient> - </aapt:attr> - </path> - <path - android:pathData="M112.74,217.05l-102.32,-0l-0,-102.32l102.32,-0z" - android:strokeWidth="1" - android:fillType="nonZero" - android:strokeColor="#00000000"> - <aapt:attr name="android:fillColor"> - <gradient - android:startY="203.36" - android:startX="60.96" - android:endY="124.990005" - android:endX="62.249996" - android:type="linear"> - <item android:offset="0.08" android:color="#FF00D9B5"/> - <item android:offset="0.3" android:color="#BA00D9B5"/> - <item android:offset="0.8" android:color="#1100D9B5"/> - <item android:offset="0.85" android:color="#0000D9B5"/> - </gradient> - </aapt:attr> - </path> - <path - android:pathData="M58,1L183.49,1C186.526,1.016 188.984,3.474 189,6.51L189,100.25L52.47,100.25L52.47,6.51C52.486,3.466 54.956,1.005 58,1Z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#F0D4FD" - android:strokeColor="#65318E" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M60.55,8.87h120.41v108.53h-120.41z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#FFFFFF" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M60.55,8.87h120.41v108.53h-120.41z" - android:strokeWidth="1" - android:fillType="nonZero" - android:strokeColor="#00000000"> - <aapt:attr name="android:fillColor"> - <gradient - android:startY="-56.010002" - android:startX="120.75" - android:endY="120.520004" - android:endX="120.75" - android:type="linear"> - <item android:offset="0.08" android:color="#FF00D9B5"/> - <item android:offset="0.12" android:color="#F700D9B5"/> - <item android:offset="0.19" android:color="#E200D9B5"/> - <item android:offset="0.26" android:color="#BF00D9B5"/> - <item android:offset="0.35" android:color="#8E00D9B5"/> - <item android:offset="0.44" android:color="#5100D9B5"/> - <item android:offset="0.54" android:color="#0700D9B5"/> - <item android:offset="0.54" android:color="#0000D9B5"/> - </gradient> - </aapt:attr> - </path> - <path - android:pathData="M77.5,120.83h134.33v10.38h-134.33z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#F0D4FD" - android:strokeColor="#65318E" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M52.47,100.25l0,10.29l25.03,20.67l0,-10.38z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#65318E" - android:strokeColor="#F0D4FD" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M60.33,33.17h43.89v37.87h-43.89z" - android:strokeWidth="1.76" - android:fillColor="#FFFFFF" - android:strokeColor="#65318E" - android:fillType="nonZero"/> - <path - android:pathData="M178.05,170.61L61.43,170.61L61.43,87C61.43,85.895 62.325,85 63.43,85L176,85C177.105,85 178,85.895 178,87L178.05,170.61Z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M66.88,89.57h105.71v76.37h-105.71z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#F0D4FD" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M177.06,170.61l-115.63,0l21.37,17.75l115.64,0z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#65318E" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M82.8,188.36h115.11v8.96h-115.11z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M61.43,170.61l0,7.04l21.37,19.67l0,-8.96z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#FFFFFF" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M190.59,183L74,183L74,99.29C74.027,98.177 74.937,97.29 76.05,97.29L188.54,97.29C189.653,97.29 190.563,98.177 190.59,99.29L190.59,183Z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M79.42,101.91h105.71v76.37h-105.71z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#F0D4FD" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M189.73,182.95l-115.77,0l21.37,17.75l115.77,0z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#65318E" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M95.33,200.7h115.38v8.96h-115.38z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M73.96,182.95l0,6.78l21.37,19.93l0,-8.96z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#FFFFFF" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M203.12,195.29L86.5,195.29L86.5,111.63C86.5,110.525 87.395,109.63 88.5,109.63L201.08,109.63C202.185,109.63 203.08,110.525 203.08,111.63L203.12,195.29Z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M91.95,114.25h105.71v76.37h-105.71z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#F0D4FD" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M202.4,195.29l-115.9,0l21.37,17.75l115.9,0z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#65318E" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M107.87,213.04h115.64v8.96h-115.64z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M86.5,195.29l0,6.51l21.37,20.2l0,-8.96z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#FFFFFF" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M215.66,207.63L99,207.63L99,124C99,122.895 99.895,122 101,122L213.61,122C214.715,122 215.61,122.895 215.61,124L215.66,207.63Z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M104.49,126.59h105.71v76.37h-105.71z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#F0D4FD" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M215.06,207.63l-116.03,0l21.37,17.75l116.03,0z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#65318E" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M120.4,225.38h115.9v8.96h-115.9z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M99.03,207.63l0,6.25l21.37,20.46l0,-8.96z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#FFFFFF" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M228.19,220L111.57,220L111.57,136.31C111.57,135.205 112.465,134.31 113.57,134.31L226.15,134.31C227.255,134.31 228.15,135.205 228.15,136.31L228.19,220Z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M117.02,138.93h105.71v76.37h-105.71z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#F0D4FD" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M227.73,219.97l-116.16,0l21.37,17.75l116.16,0z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#65318E" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M132.94,237.72h116.16v8.96h-116.16z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M111.57,219.97l0,5.99l21.37,19.72l0,-7.96z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#FFFFFF" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M245.52,234.67L128.9,234.67L128.9,151C128.9,149.895 129.795,149 130.9,149L243.48,149C244.585,149 245.48,149.895 245.48,151L245.52,234.67Z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M134.36,153.64h105.71v76.37h-105.71z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#F0D4FD" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M245.06,234.67l-116.16,0l21.37,17.76l116.16,0z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#65318E" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M150.27,252.43h116.16v8.96h-116.16z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M60.33,33.89h41.01v38.59h-41.01z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#65318E" - android:strokeColor="#65318E" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M67.24,33.89h34.1v30.04h-34.1z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#65318E" - android:strokeColor="#65318E" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M150.62,58.81L150.62,151L279.49,151L279.49,58.81C279.49,55.01 276.41,51.93 272.61,51.93L157.5,51.93C153.7,51.93 150.62,55.01 150.62,58.81ZM273.46,142.2L156.65,142.2L156.65,61.41L273.46,61.41L273.46,142.2Z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M277.38,150.95l-126.76,0l23.62,19.62l126.76,0z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#F0D4FD" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M174.24,170.57h126.76v9.9h-126.76z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M150.62,150.95l0,9.81l23.62,19.71l0,-9.9z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#490260" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M157.37,61.41h116.09v80.79h-116.09z" - android:strokeWidth="1.76" - android:fillColor="#FFFFFF" - android:strokeColor="#65318E" - android:fillType="nonZero"/> - <path - android:pathData="M157.37,61.41h116.09v80.79h-116.09z" - android:strokeWidth="1" - android:fillType="nonZero" - android:strokeColor="#00000000"> - <aapt:attr name="android:fillColor"> - <gradient - android:startY="18.45" - android:startX="215.42" - android:endY="112.96" - android:endX="215.42" - android:type="linear"> - <item android:offset="0.08" android:color="#FFF0D4FD"/> - <item android:offset="0.27" android:color="#C4F0D4FD"/> - <item android:offset="0.7" android:color="#33F0D4FD"/> - <item android:offset="0.85" android:color="#00F0D4FD"/> - </gradient> - </aapt:attr> - </path> - <path - android:pathData="M157.37,61.41h1.72v80.79h-1.72z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#490260" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M5.78,27.13L119,27.13C121.64,27.13 123.78,29.27 123.78,31.91L123.78,119.64L1,119.64L1,31.9C1.006,29.264 3.144,27.13 5.78,27.13Z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M9.05,34.34h106.66v76.63h-106.66z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#FFFFFF" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M121.75,119.63l-120.75,0l22.5,18.69l120.74,0z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#F0D4FD" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M23.5,138.32h120.75v9.43h-120.75z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#00D9B5" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M1,119.63l0,9.34l22.5,18.78l0,-9.43z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#490260" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M9.82,35.75h104.98v74.01h-104.98z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#FFFFFF" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M9.82,35.75h104.98v74.01h-104.98z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#FFFFFF" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M58.1,35.75L115.36,35.75L115.36,102.15L65.3,102.15C61.341,102.156 58.122,98.959 58.1,95L58.1,35.75Z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#F0D4FD" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M69.28,35.43h46.09v53.39h-46.09z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#F0D4FD" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M9.05,110.21L9.05,34.34L12.25,34.34L12.25,107C12.253,107.85 11.917,108.667 11.316,109.269C10.716,109.871 9.9,110.21 9.05,110.21Z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#490260" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> - <path - android:pathData="M132.94,246.68l17.33,14.71l0,-8.96l-17.33,-14.71z" - android:strokeLineJoin="round" - android:strokeWidth="1.76" - android:fillColor="#FFFFFF" - android:strokeColor="#490260" - android:fillType="nonZero" - android:strokeLineCap="round"/> -</vector> ===================================== fenix/app/src/main/res/layout/tor_bootstrap_connect.xml deleted ===================================== @@ -1,100 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- This Source Code Form is subject to the terms of the Mozilla Public - - License, v. 2.0. If a copy of the MPL was not distributed with this - - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - xmlns:tools="http://schemas.android.com/tools" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_gravity="bottom" - android:layout_marginLeft="16dp" - android:layout_marginRight="16dp" > - - <ImageView - android:id="@+id/tor_bootstrap_network_settings_button" - app:srcCompat="@drawable/mozac_ic_settings" - android:scaleType="fitCenter" - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:layout_marginTop="20dp" - android:layout_alignParentTop="true" - android:layout_alignParentEnd="true" - tools:ignore="ContentDescription" /> - - <ImageView - android:id="@+id/tor_bootstrap_image" - app:srcCompat="@drawable/ic_tor_connect_computer_graphic" - android:scaleType="fitCenter" - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:layout_marginTop="80dp" - android:layout_marginBottom="10dp" - android:layout_centerHorizontal="true" - android:layout_below="@id/tor_bootstrap_network_settings_button" - android:layout_above="@id/tor_bootstrap_connect_button" - android:gravity="center" - tools:ignore="ContentDescription" /> - - <androidx.appcompat.widget.SwitchCompat - android:id="@+id/quick_start_toggle" - android:visibility="gone" - android:checked="false" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_above="@id/tor_bootstrap_connect_button" /> - - <Button - android:id="@+id/tor_bootstrap_connect_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:width="160dp" - android:height="36dp" - android:layout_marginBottom="10dp" - android:layout_centerHorizontal="true" - android:layout_above="@id/tor_bootstrap_status_message" - android:gravity="center|center_vertical" - android:text="@string/tor_bootstrap_connect" - android:fontFamily="Roboto-Medium" - android:textColor="#FF000000" - android:textSize="18sp" - android:lineSpacingMultiplier="0.89" - android:background="@drawable/rounded_corners" /> - - <TextView - android:id="@+id/tor_bootstrap_status_message" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginBottom="32dp" - android:layout_centerHorizontal="true" - android:paddingStart="8dp" - android:paddingEnd="8dp" - android:gravity="center" - android:lines="3" - android:layout_above="@id/tor_bootstrap_swipe_log" /> - - <TextView - android:id="@+id/tor_bootstrap_swipe_log" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:width="360dp" - android:height="24dp" - android:layout_marginBottom="15dp" - android:layout_centerHorizontal="true" - android:layout_alignParentBottom="true" - android:gravity="center" - android:textSize="14sp" - android:textColor="#FFFFFFFF" - android:fontFamily="Roboto-Regular" - android:lineSpacingMultiplier="1.71" - android:text="@string/tor_bootstrap_swipe_for_logs" - android:layout_above="@id/tor_bootstrap_progress" /> - - <ProgressBar - android:id="@+id/tor_bootstrap_progress" - style="?android:attr/progressBarStyleHorizontal" - android:layout_width="match_parent" - android:layout_height="3dp" - android:visibility="invisible" - android:layout_alignParentBottom="true" /> -</RelativeLayout> ===================================== fenix/app/src/main/res/layout/tor_bootstrap_logger.xml deleted ===================================== @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- This Source Code Form is subject to the terms of the Mozilla Public - - License, v. 2.0. If a copy of the MPL was not distributed with this - - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> -<FrameLayout - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - android:layout_width="match_parent" - android:layout_height="match_parent"> - <TextView - android:id="@+id/tor_bootstrap_log_entries" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:gravity="bottom" - android:textColor="@android:color/white" - android:fontFamily="RobotoMono-Regular" - android:textSize="12sp" - android:textIsSelectable="true" - android:layout_marginLeft="20dp" - android:layout_marginRight="20dp" - android:layout_marginBottom="20dp" /> -</FrameLayout> ===================================== fenix/app/src/main/res/layout/tor_bootstrap_pager.xml deleted ===================================== @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- This Source Code Form is subject to the terms of the Mozilla Public - - License, v. 2.0. If a copy of the MPL was not distributed with this - - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - -<com.google.android.material.appbar.AppBarLayout - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical" - android:background="?torBootstrapBackground"> - - <androidx.viewpager2.widget.ViewPager2 - android:id="@+id/bootstrap_pager" - android:layout_width="match_parent" - android:layout_height="match_parent" /> -</com.google.android.material.appbar.AppBarLayout> View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/cf7… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/cf7… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.11.0esr-13.5-1] 2 commits: Revert "Bug 41881: Don't persist custom network requests on private windows"
by richard (@richard) 13 May '24

13 May '24
richard pushed to branch mullvad-browser-115.11.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser Commits: bea39ca4 by Pier Angelo Vendrame at 2024-05-13T20:40:44+00:00 Revert &quot;Bug 41881: Don&#39;t persist custom network requests on private windows&quot; This reverts commit 6450a4e62e810832f35ee8732a4630ec2c2ba6f6. - - - - - 400cba03 by cypherpunks1 at 2024-05-13T20:40:45+00:00 Bug 1892052 - Do not persist custom network requests on PBM. r=devtools-reviewers,bomsy,nchevobbe Differential Revision: https://phabricator.services.mozilla.com/D207762 - - - - - 3 changed files: - devtools/client/netmonitor/src/components/new-request/HTTPCustomRequestPanel.js - devtools/client/netmonitor/test/browser_net_new_request_panel_persisted_content.js - devtools/client/netmonitor/test/head.js Changes: ===================================== devtools/client/netmonitor/src/components/new-request/HTTPCustomRequestPanel.js ===================================== @@ -4,11 +4,6 @@ "use strict"; -const lazy = {}; -ChromeUtils.defineESModuleGetters(lazy, { - PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs", -}); - const { Component, createFactory, @@ -127,7 +122,7 @@ class HTTPCustomRequestPanel extends Component { async componentDidMount() { let { connector, request } = this.props; - if (!lazy.PrivateBrowsingUtils.isWindowPrivate(window)) { + if (!connector.currentTarget?.targetForm?.isPrivate) { const persistedCustomRequest = await asyncStorage.getItem( "devtools.netmonitor.customRequest" ); @@ -198,7 +193,7 @@ class HTTPCustomRequestPanel extends Component { } componentWillUnmount() { - if (!lazy.PrivateBrowsingUtils.isWindowPrivate(window)) { + if (!this.props.connector.currentTarget?.targetForm?.isPrivate) { asyncStorage.setItem("devtools.netmonitor.customRequest", this.state); } } ===================================== devtools/client/netmonitor/test/browser_net_new_request_panel_persisted_content.js ===================================== @@ -9,30 +9,14 @@ const asyncStorage = require("resource://devtools/shared/async-storage.js"); * Test if content is still persisted after the panel is closed */ -add_task(async function () { - // Turn true the pref - await pushPref("devtools.netmonitor.features.newEditAndResend", true); - // Reset the storage for the persisted custom request - await asyncStorage.removeItem("devtools.netmonitor.customRequest"); - - const { monitor } = await initNetMonitor(HTTPS_CUSTOM_GET_URL, { - requestCount: 1, - }); - info("Starting test... "); - - const { document, store, windowRequire } = monitor.panelWin; - - // Action should be processed synchronously in tests. - const Actions = windowRequire("devtools/client/netmonitor/src/actions/index"); - store.dispatch(Actions.batchEnable(false)); - - info("open the left panel"); - let waitForPanels = waitForDOM( +async function addCustomRequestTestContent(tab, monitor, document) { + info("Open the left panel"); + const waitForPanels = waitForDOM( document, ".monitor-panel .network-action-bar" ); - let HTTPCustomRequestButton = document.querySelector( + const HTTPCustomRequestButton = document.querySelector( "#netmonitor-toolbar-container .devtools-http-custom-request-icon" ); HTTPCustomRequestButton.click(); @@ -59,91 +43,166 @@ add_task(async function () { "#http-custom-query .map-add-new-inputs .http-custom-input-name" ); newParameterName.focus(); - EventUtils.sendString("My-param"); + EventUtils.sendString("My-param", monitor.panelWin); info("Adding new headers"); const newHeaderName = document.querySelector( "#http-custom-headers .map-add-new-inputs .http-custom-input-name" ); newHeaderName.focus(); - EventUtils.sendString("My-header"); + EventUtils.sendString("My-header", monitor.panelWin); const newHeaderValue = Array.from( document.querySelectorAll( "#http-custom-headers .http-custom-input .http-custom-input-value" ) - ).pop(); + ).at(-1); newHeaderValue.focus(); - EventUtils.sendString("my-value"); + EventUtils.sendString("my-value", monitor.panelWin); const postValue = document.querySelector("#http-custom-postdata-value"); postValue.focus(); - EventUtils.sendString("{'Name': 'Value'}"); + EventUtils.sendString("{'Name': 'Value'}", monitor.panelWin); - // Close the panel + info("Close the panel"); const closePanel = document.querySelector( ".network-action-bar .tabs-navigation .sidebar-toggle" ); closePanel.click(); +} - // Open the panel again to see if the content is still there - waitForPanels = waitUntil( +async function runTests(tab, monitor, document, isPrivate = false) { + info("Open the panel again to see if the content is still there"); + const waitForPanels = waitFor( () => document.querySelector(".http-custom-request-panel") && document.querySelector("#http-custom-request-send-button").disabled === - false + isPrivate ); - HTTPCustomRequestButton = document.querySelector( + const HTTPCustomRequestButton = document.querySelector( "#netmonitor-toolbar-container .devtools-http-custom-request-icon" ); HTTPCustomRequestButton.click(); await waitForPanels; - is( - methodValue.value, - "POST", - "The content should still be there after the user close the panel and re-opened" - ); - - is( - url.value, - "https://www.example.com?My-param=", - "The url should still be there after the user close the panel and re-opened" - ); + // Wait a few seconds to make sure all the fields have been updated + await wait(1500); + + const customMethod = document.querySelector("#http-custom-method-value"); + const customUrl = document.querySelector(".http-custom-url-value"); + const customQuery = document.querySelectorAll( + "#http-custom-query .tabpanel-summary-container.http-custom-input textarea" + ); + const customHeaders = document.querySelectorAll( + "#http-custom-headers .tabpanel-summary-container.http-custom-input textarea" + ); + const postDataValue = document.querySelector("#http-custom-postdata-value"); + + if (isPrivate) { + is( + customMethod.value, + "GET", + "The method should not be persisted after the user close the panel and re-opened in PBM" + ); + + is( + customUrl.value, + "", + "The url should not be there after the user close the panel and re-opened in PBM" + ); + + is( + customQuery.length, + 0, + "The Parameter should not be there after the user close the panel and re-opened in PBM" + ); + + is( + customHeaders.length, + 0, + "There should be no custom headers after the user close the panel and re-opened in PBM" + ); + + is( + postDataValue.value, + "", + "The post data should still be reset after the user close the panel and re-opened in PBM" + ); + } else { + is( + customMethod.value, + "POST", + "The method should be persisted after the user close the panel and re-opened" + ); + + is( + customUrl.value, + "https://www.example.com?My-param=", + "The url should still be there after the user close the panel and re-opened" + ); + + const [nameParam] = Array.from(customQuery); + is( + nameParam.value, + "My-param", + "The Parameter name should still be there after the user close the panel and re-opened" + ); + + const [name, value] = Array.from(customHeaders); + is( + name.value, + "My-header", + "The header name should still be there after the user close the panel and re-opened" + ); + is( + value.value, + "my-value", + "The header value should still be there after the user close the panel and re-opened" + ); + + is( + postDataValue.value, + "{'Name': 'Value'}", + "The content should still be there after the user close the panel and re-opened" + ); + } +} + +add_task(async function testRequestPanelPersistedContent() { + // Turn true the pref + await pushPref("devtools.netmonitor.features.newEditAndResend", true); + // Reset the storage for the persisted custom request + await asyncStorage.removeItem("devtools.netmonitor.customRequest"); - const [nameParam] = Array.from( - document.querySelectorAll( - "#http-custom-query .tabpanel-summary-container.http-custom-input textarea" - ) - ); - is( - nameParam.value, - "My-param", - "The Parameter name should still be there after the user close the panel and re-opened" - ); + const { tab, monitor } = await initNetMonitor(HTTPS_CUSTOM_GET_URL, { + requestCount: 1, + }); + const { document, store, windowRequire } = monitor.panelWin; + const Actions = windowRequire("devtools/client/netmonitor/src/actions/index"); + store.dispatch(Actions.batchEnable(false)); - const [name, value] = Array.from( - document.querySelectorAll( - "#http-custom-headers .tabpanel-summary-container.http-custom-input textarea" - ) - ); - is( - name.value, - "My-header", - "The header name should still be there after the user close the panel and re-opened" - ); - is( - value.value, - "my-value", - "The header value should still be there after the user close the panel and re-opened" - ); + info("Starting test... "); + info("Add initial custom request test content"); + await addCustomRequestTestContent(tab, monitor, document); + await runTests(tab, monitor, document); + await teardown(monitor); +}); - is( - postValue.value, - "{'Name': 'Value'}", - "The content should still be there after the user close the panel and re-opened" +add_task(async function testRequestPanelPersistedContentInPrivateWindow() { + await pushPref("devtools.netmonitor.features.newEditAndResend", true); + const { tab, monitor, privateWindow } = await initNetMonitor( + HTTPS_CUSTOM_GET_URL, + { + requestCount: 1, + openInPrivateWindow: true, + } ); + const { document, store, windowRequire } = monitor.panelWin; + const Actions = windowRequire("devtools/client/netmonitor/src/actions/index"); + store.dispatch(Actions.batchEnable(false)); - await teardown(monitor); + info("Starting test in private window... "); + await runTests(tab, monitor, document, true); + await teardown(monitor, privateWindow); }); ===================================== devtools/client/netmonitor/test/head.js ===================================== @@ -321,6 +321,7 @@ function initNetMonitor( expectedEventTimings, waitForLoad = true, enableCache = false, + openInPrivateWindow = false, } ) { info("Initializing a network monitor pane."); @@ -341,7 +342,22 @@ function initNetMonitor( ], }); - const tab = await addTab(url, { waitForLoad }); + let tab = null; + let privateWindow = null; + + if (openInPrivateWindow) { + privateWindow = await BrowserTestUtils.openNewBrowserWindow({ + private: true, + }); + ok( + PrivateBrowsingUtils.isContentWindowPrivate(privateWindow), + "window is private" + ); + tab = BrowserTestUtils.addTab(privateWindow.gBrowser, url); + } else { + tab = await addTab(url, { waitForLoad }); + } + info("Net tab added successfully: " + url); const toolbox = await gDevTools.showToolboxForTab(tab, { @@ -371,7 +387,7 @@ function initNetMonitor( await clearNetworkEvents(monitor); } - return { tab, monitor, toolbox }; + return { tab, monitor, toolbox, privateWindow }; })(); } @@ -408,7 +424,7 @@ async function clearNetworkEvents(monitor) { store.dispatch(Actions.clearRequests()); } -function teardown(monitor) { +function teardown(monitor, privateWindow) { info("Destroying the specified network monitor."); return (async function () { @@ -419,6 +435,12 @@ function teardown(monitor) { await monitor.toolbox.destroy(); await removeTab(tab); + + if (privateWindow) { + const closed = BrowserTestUtils.windowClosed(privateWindow); + privateWindow.BrowserCommands.tryToCloseWindow(); + await closed; + } })(); } View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/be… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/be… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-115.11.0esr-13.5-1] 2 commits: Revert "Bug 41881: Don't persist custom network requests on private windows"
by richard (@richard) 13 May '24

13 May '24
richard pushed to branch base-browser-115.11.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 1e2cec74 by Pier Angelo Vendrame at 2024-05-13T20:39:35+00:00 Revert &quot;Bug 41881: Don&#39;t persist custom network requests on private windows&quot; This reverts commit 6450a4e62e810832f35ee8732a4630ec2c2ba6f6. - - - - - fa7dafa6 by cypherpunks1 at 2024-05-13T20:39:43+00:00 Bug 1892052 - Do not persist custom network requests on PBM. r=devtools-reviewers,bomsy,nchevobbe Differential Revision: https://phabricator.services.mozilla.com/D207762 - - - - - 3 changed files: - devtools/client/netmonitor/src/components/new-request/HTTPCustomRequestPanel.js - devtools/client/netmonitor/test/browser_net_new_request_panel_persisted_content.js - devtools/client/netmonitor/test/head.js Changes: ===================================== devtools/client/netmonitor/src/components/new-request/HTTPCustomRequestPanel.js ===================================== @@ -4,11 +4,6 @@ "use strict"; -const lazy = {}; -ChromeUtils.defineESModuleGetters(lazy, { - PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs", -}); - const { Component, createFactory, @@ -127,7 +122,7 @@ class HTTPCustomRequestPanel extends Component { async componentDidMount() { let { connector, request } = this.props; - if (!lazy.PrivateBrowsingUtils.isWindowPrivate(window)) { + if (!connector.currentTarget?.targetForm?.isPrivate) { const persistedCustomRequest = await asyncStorage.getItem( "devtools.netmonitor.customRequest" ); @@ -198,7 +193,7 @@ class HTTPCustomRequestPanel extends Component { } componentWillUnmount() { - if (!lazy.PrivateBrowsingUtils.isWindowPrivate(window)) { + if (!this.props.connector.currentTarget?.targetForm?.isPrivate) { asyncStorage.setItem("devtools.netmonitor.customRequest", this.state); } } ===================================== devtools/client/netmonitor/test/browser_net_new_request_panel_persisted_content.js ===================================== @@ -9,30 +9,14 @@ const asyncStorage = require("resource://devtools/shared/async-storage.js"); * Test if content is still persisted after the panel is closed */ -add_task(async function () { - // Turn true the pref - await pushPref("devtools.netmonitor.features.newEditAndResend", true); - // Reset the storage for the persisted custom request - await asyncStorage.removeItem("devtools.netmonitor.customRequest"); - - const { monitor } = await initNetMonitor(HTTPS_CUSTOM_GET_URL, { - requestCount: 1, - }); - info("Starting test... "); - - const { document, store, windowRequire } = monitor.panelWin; - - // Action should be processed synchronously in tests. - const Actions = windowRequire("devtools/client/netmonitor/src/actions/index"); - store.dispatch(Actions.batchEnable(false)); - - info("open the left panel"); - let waitForPanels = waitForDOM( +async function addCustomRequestTestContent(tab, monitor, document) { + info("Open the left panel"); + const waitForPanels = waitForDOM( document, ".monitor-panel .network-action-bar" ); - let HTTPCustomRequestButton = document.querySelector( + const HTTPCustomRequestButton = document.querySelector( "#netmonitor-toolbar-container .devtools-http-custom-request-icon" ); HTTPCustomRequestButton.click(); @@ -59,91 +43,166 @@ add_task(async function () { "#http-custom-query .map-add-new-inputs .http-custom-input-name" ); newParameterName.focus(); - EventUtils.sendString("My-param"); + EventUtils.sendString("My-param", monitor.panelWin); info("Adding new headers"); const newHeaderName = document.querySelector( "#http-custom-headers .map-add-new-inputs .http-custom-input-name" ); newHeaderName.focus(); - EventUtils.sendString("My-header"); + EventUtils.sendString("My-header", monitor.panelWin); const newHeaderValue = Array.from( document.querySelectorAll( "#http-custom-headers .http-custom-input .http-custom-input-value" ) - ).pop(); + ).at(-1); newHeaderValue.focus(); - EventUtils.sendString("my-value"); + EventUtils.sendString("my-value", monitor.panelWin); const postValue = document.querySelector("#http-custom-postdata-value"); postValue.focus(); - EventUtils.sendString("{'Name': 'Value'}"); + EventUtils.sendString("{'Name': 'Value'}", monitor.panelWin); - // Close the panel + info("Close the panel"); const closePanel = document.querySelector( ".network-action-bar .tabs-navigation .sidebar-toggle" ); closePanel.click(); +} - // Open the panel again to see if the content is still there - waitForPanels = waitUntil( +async function runTests(tab, monitor, document, isPrivate = false) { + info("Open the panel again to see if the content is still there"); + const waitForPanels = waitFor( () => document.querySelector(".http-custom-request-panel") && document.querySelector("#http-custom-request-send-button").disabled === - false + isPrivate ); - HTTPCustomRequestButton = document.querySelector( + const HTTPCustomRequestButton = document.querySelector( "#netmonitor-toolbar-container .devtools-http-custom-request-icon" ); HTTPCustomRequestButton.click(); await waitForPanels; - is( - methodValue.value, - "POST", - "The content should still be there after the user close the panel and re-opened" - ); - - is( - url.value, - "https://www.example.com?My-param=", - "The url should still be there after the user close the panel and re-opened" - ); + // Wait a few seconds to make sure all the fields have been updated + await wait(1500); + + const customMethod = document.querySelector("#http-custom-method-value"); + const customUrl = document.querySelector(".http-custom-url-value"); + const customQuery = document.querySelectorAll( + "#http-custom-query .tabpanel-summary-container.http-custom-input textarea" + ); + const customHeaders = document.querySelectorAll( + "#http-custom-headers .tabpanel-summary-container.http-custom-input textarea" + ); + const postDataValue = document.querySelector("#http-custom-postdata-value"); + + if (isPrivate) { + is( + customMethod.value, + "GET", + "The method should not be persisted after the user close the panel and re-opened in PBM" + ); + + is( + customUrl.value, + "", + "The url should not be there after the user close the panel and re-opened in PBM" + ); + + is( + customQuery.length, + 0, + "The Parameter should not be there after the user close the panel and re-opened in PBM" + ); + + is( + customHeaders.length, + 0, + "There should be no custom headers after the user close the panel and re-opened in PBM" + ); + + is( + postDataValue.value, + "", + "The post data should still be reset after the user close the panel and re-opened in PBM" + ); + } else { + is( + customMethod.value, + "POST", + "The method should be persisted after the user close the panel and re-opened" + ); + + is( + customUrl.value, + "https://www.example.com?My-param=", + "The url should still be there after the user close the panel and re-opened" + ); + + const [nameParam] = Array.from(customQuery); + is( + nameParam.value, + "My-param", + "The Parameter name should still be there after the user close the panel and re-opened" + ); + + const [name, value] = Array.from(customHeaders); + is( + name.value, + "My-header", + "The header name should still be there after the user close the panel and re-opened" + ); + is( + value.value, + "my-value", + "The header value should still be there after the user close the panel and re-opened" + ); + + is( + postDataValue.value, + "{'Name': 'Value'}", + "The content should still be there after the user close the panel and re-opened" + ); + } +} + +add_task(async function testRequestPanelPersistedContent() { + // Turn true the pref + await pushPref("devtools.netmonitor.features.newEditAndResend", true); + // Reset the storage for the persisted custom request + await asyncStorage.removeItem("devtools.netmonitor.customRequest"); - const [nameParam] = Array.from( - document.querySelectorAll( - "#http-custom-query .tabpanel-summary-container.http-custom-input textarea" - ) - ); - is( - nameParam.value, - "My-param", - "The Parameter name should still be there after the user close the panel and re-opened" - ); + const { tab, monitor } = await initNetMonitor(HTTPS_CUSTOM_GET_URL, { + requestCount: 1, + }); + const { document, store, windowRequire } = monitor.panelWin; + const Actions = windowRequire("devtools/client/netmonitor/src/actions/index"); + store.dispatch(Actions.batchEnable(false)); - const [name, value] = Array.from( - document.querySelectorAll( - "#http-custom-headers .tabpanel-summary-container.http-custom-input textarea" - ) - ); - is( - name.value, - "My-header", - "The header name should still be there after the user close the panel and re-opened" - ); - is( - value.value, - "my-value", - "The header value should still be there after the user close the panel and re-opened" - ); + info("Starting test... "); + info("Add initial custom request test content"); + await addCustomRequestTestContent(tab, monitor, document); + await runTests(tab, monitor, document); + await teardown(monitor); +}); - is( - postValue.value, - "{'Name': 'Value'}", - "The content should still be there after the user close the panel and re-opened" +add_task(async function testRequestPanelPersistedContentInPrivateWindow() { + await pushPref("devtools.netmonitor.features.newEditAndResend", true); + const { tab, monitor, privateWindow } = await initNetMonitor( + HTTPS_CUSTOM_GET_URL, + { + requestCount: 1, + openInPrivateWindow: true, + } ); + const { document, store, windowRequire } = monitor.panelWin; + const Actions = windowRequire("devtools/client/netmonitor/src/actions/index"); + store.dispatch(Actions.batchEnable(false)); - await teardown(monitor); + info("Starting test in private window... "); + await runTests(tab, monitor, document, true); + await teardown(monitor, privateWindow); }); ===================================== devtools/client/netmonitor/test/head.js ===================================== @@ -321,6 +321,7 @@ function initNetMonitor( expectedEventTimings, waitForLoad = true, enableCache = false, + openInPrivateWindow = false, } ) { info("Initializing a network monitor pane."); @@ -341,7 +342,22 @@ function initNetMonitor( ], }); - const tab = await addTab(url, { waitForLoad }); + let tab = null; + let privateWindow = null; + + if (openInPrivateWindow) { + privateWindow = await BrowserTestUtils.openNewBrowserWindow({ + private: true, + }); + ok( + PrivateBrowsingUtils.isContentWindowPrivate(privateWindow), + "window is private" + ); + tab = BrowserTestUtils.addTab(privateWindow.gBrowser, url); + } else { + tab = await addTab(url, { waitForLoad }); + } + info("Net tab added successfully: " + url); const toolbox = await gDevTools.showToolboxForTab(tab, { @@ -371,7 +387,7 @@ function initNetMonitor( await clearNetworkEvents(monitor); } - return { tab, monitor, toolbox }; + return { tab, monitor, toolbox, privateWindow }; })(); } @@ -408,7 +424,7 @@ async function clearNetworkEvents(monitor) { store.dispatch(Actions.clearRequests()); } -function teardown(monitor) { +function teardown(monitor, privateWindow) { info("Destroying the specified network monitor."); return (async function () { @@ -419,6 +435,12 @@ function teardown(monitor) { await monitor.toolbox.destroy(); await removeTab(tab); + + if (privateWindow) { + const closed = BrowserTestUtils.windowClosed(privateWindow); + privateWindow.BrowserCommands.tryToCloseWindow(); + await closed; + } })(); } View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/3bed85… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/3bed85… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.11.0esr-13.5-1] 2 commits: Revert "Bug 41881: Don't persist custom network requests on private windows"
by richard (@richard) 13 May '24

13 May '24
richard pushed to branch tor-browser-115.11.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 55da4b57 by Pier Angelo Vendrame at 2024-05-13T20:38:15+00:00 Revert &quot;Bug 41881: Don&#39;t persist custom network requests on private windows&quot; This reverts commit 6450a4e62e810832f35ee8732a4630ec2c2ba6f6. - - - - - 894dc8df by cypherpunks1 at 2024-05-13T20:38:15+00:00 Bug 1892052 - Do not persist custom network requests on PBM. r=devtools-reviewers,bomsy,nchevobbe Differential Revision: https://phabricator.services.mozilla.com/D207762 - - - - - 3 changed files: - devtools/client/netmonitor/src/components/new-request/HTTPCustomRequestPanel.js - devtools/client/netmonitor/test/browser_net_new_request_panel_persisted_content.js - devtools/client/netmonitor/test/head.js Changes: ===================================== devtools/client/netmonitor/src/components/new-request/HTTPCustomRequestPanel.js ===================================== @@ -4,11 +4,6 @@ "use strict"; -const lazy = {}; -ChromeUtils.defineESModuleGetters(lazy, { - PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs", -}); - const { Component, createFactory, @@ -127,7 +122,7 @@ class HTTPCustomRequestPanel extends Component { async componentDidMount() { let { connector, request } = this.props; - if (!lazy.PrivateBrowsingUtils.isWindowPrivate(window)) { + if (!connector.currentTarget?.targetForm?.isPrivate) { const persistedCustomRequest = await asyncStorage.getItem( "devtools.netmonitor.customRequest" ); @@ -198,7 +193,7 @@ class HTTPCustomRequestPanel extends Component { } componentWillUnmount() { - if (!lazy.PrivateBrowsingUtils.isWindowPrivate(window)) { + if (!this.props.connector.currentTarget?.targetForm?.isPrivate) { asyncStorage.setItem("devtools.netmonitor.customRequest", this.state); } } ===================================== devtools/client/netmonitor/test/browser_net_new_request_panel_persisted_content.js ===================================== @@ -9,30 +9,14 @@ const asyncStorage = require("resource://devtools/shared/async-storage.js"); * Test if content is still persisted after the panel is closed */ -add_task(async function () { - // Turn true the pref - await pushPref("devtools.netmonitor.features.newEditAndResend", true); - // Reset the storage for the persisted custom request - await asyncStorage.removeItem("devtools.netmonitor.customRequest"); - - const { monitor } = await initNetMonitor(HTTPS_CUSTOM_GET_URL, { - requestCount: 1, - }); - info("Starting test... "); - - const { document, store, windowRequire } = monitor.panelWin; - - // Action should be processed synchronously in tests. - const Actions = windowRequire("devtools/client/netmonitor/src/actions/index"); - store.dispatch(Actions.batchEnable(false)); - - info("open the left panel"); - let waitForPanels = waitForDOM( +async function addCustomRequestTestContent(tab, monitor, document) { + info("Open the left panel"); + const waitForPanels = waitForDOM( document, ".monitor-panel .network-action-bar" ); - let HTTPCustomRequestButton = document.querySelector( + const HTTPCustomRequestButton = document.querySelector( "#netmonitor-toolbar-container .devtools-http-custom-request-icon" ); HTTPCustomRequestButton.click(); @@ -59,91 +43,166 @@ add_task(async function () { "#http-custom-query .map-add-new-inputs .http-custom-input-name" ); newParameterName.focus(); - EventUtils.sendString("My-param"); + EventUtils.sendString("My-param", monitor.panelWin); info("Adding new headers"); const newHeaderName = document.querySelector( "#http-custom-headers .map-add-new-inputs .http-custom-input-name" ); newHeaderName.focus(); - EventUtils.sendString("My-header"); + EventUtils.sendString("My-header", monitor.panelWin); const newHeaderValue = Array.from( document.querySelectorAll( "#http-custom-headers .http-custom-input .http-custom-input-value" ) - ).pop(); + ).at(-1); newHeaderValue.focus(); - EventUtils.sendString("my-value"); + EventUtils.sendString("my-value", monitor.panelWin); const postValue = document.querySelector("#http-custom-postdata-value"); postValue.focus(); - EventUtils.sendString("{'Name': 'Value'}"); + EventUtils.sendString("{'Name': 'Value'}", monitor.panelWin); - // Close the panel + info("Close the panel"); const closePanel = document.querySelector( ".network-action-bar .tabs-navigation .sidebar-toggle" ); closePanel.click(); +} - // Open the panel again to see if the content is still there - waitForPanels = waitUntil( +async function runTests(tab, monitor, document, isPrivate = false) { + info("Open the panel again to see if the content is still there"); + const waitForPanels = waitFor( () => document.querySelector(".http-custom-request-panel") && document.querySelector("#http-custom-request-send-button").disabled === - false + isPrivate ); - HTTPCustomRequestButton = document.querySelector( + const HTTPCustomRequestButton = document.querySelector( "#netmonitor-toolbar-container .devtools-http-custom-request-icon" ); HTTPCustomRequestButton.click(); await waitForPanels; - is( - methodValue.value, - "POST", - "The content should still be there after the user close the panel and re-opened" - ); - - is( - url.value, - "https://www.example.com?My-param=", - "The url should still be there after the user close the panel and re-opened" - ); + // Wait a few seconds to make sure all the fields have been updated + await wait(1500); + + const customMethod = document.querySelector("#http-custom-method-value"); + const customUrl = document.querySelector(".http-custom-url-value"); + const customQuery = document.querySelectorAll( + "#http-custom-query .tabpanel-summary-container.http-custom-input textarea" + ); + const customHeaders = document.querySelectorAll( + "#http-custom-headers .tabpanel-summary-container.http-custom-input textarea" + ); + const postDataValue = document.querySelector("#http-custom-postdata-value"); + + if (isPrivate) { + is( + customMethod.value, + "GET", + "The method should not be persisted after the user close the panel and re-opened in PBM" + ); + + is( + customUrl.value, + "", + "The url should not be there after the user close the panel and re-opened in PBM" + ); + + is( + customQuery.length, + 0, + "The Parameter should not be there after the user close the panel and re-opened in PBM" + ); + + is( + customHeaders.length, + 0, + "There should be no custom headers after the user close the panel and re-opened in PBM" + ); + + is( + postDataValue.value, + "", + "The post data should still be reset after the user close the panel and re-opened in PBM" + ); + } else { + is( + customMethod.value, + "POST", + "The method should be persisted after the user close the panel and re-opened" + ); + + is( + customUrl.value, + "https://www.example.com?My-param=", + "The url should still be there after the user close the panel and re-opened" + ); + + const [nameParam] = Array.from(customQuery); + is( + nameParam.value, + "My-param", + "The Parameter name should still be there after the user close the panel and re-opened" + ); + + const [name, value] = Array.from(customHeaders); + is( + name.value, + "My-header", + "The header name should still be there after the user close the panel and re-opened" + ); + is( + value.value, + "my-value", + "The header value should still be there after the user close the panel and re-opened" + ); + + is( + postDataValue.value, + "{'Name': 'Value'}", + "The content should still be there after the user close the panel and re-opened" + ); + } +} + +add_task(async function testRequestPanelPersistedContent() { + // Turn true the pref + await pushPref("devtools.netmonitor.features.newEditAndResend", true); + // Reset the storage for the persisted custom request + await asyncStorage.removeItem("devtools.netmonitor.customRequest"); - const [nameParam] = Array.from( - document.querySelectorAll( - "#http-custom-query .tabpanel-summary-container.http-custom-input textarea" - ) - ); - is( - nameParam.value, - "My-param", - "The Parameter name should still be there after the user close the panel and re-opened" - ); + const { tab, monitor } = await initNetMonitor(HTTPS_CUSTOM_GET_URL, { + requestCount: 1, + }); + const { document, store, windowRequire } = monitor.panelWin; + const Actions = windowRequire("devtools/client/netmonitor/src/actions/index"); + store.dispatch(Actions.batchEnable(false)); - const [name, value] = Array.from( - document.querySelectorAll( - "#http-custom-headers .tabpanel-summary-container.http-custom-input textarea" - ) - ); - is( - name.value, - "My-header", - "The header name should still be there after the user close the panel and re-opened" - ); - is( - value.value, - "my-value", - "The header value should still be there after the user close the panel and re-opened" - ); + info("Starting test... "); + info("Add initial custom request test content"); + await addCustomRequestTestContent(tab, monitor, document); + await runTests(tab, monitor, document); + await teardown(monitor); +}); - is( - postValue.value, - "{'Name': 'Value'}", - "The content should still be there after the user close the panel and re-opened" +add_task(async function testRequestPanelPersistedContentInPrivateWindow() { + await pushPref("devtools.netmonitor.features.newEditAndResend", true); + const { tab, monitor, privateWindow } = await initNetMonitor( + HTTPS_CUSTOM_GET_URL, + { + requestCount: 1, + openInPrivateWindow: true, + } ); + const { document, store, windowRequire } = monitor.panelWin; + const Actions = windowRequire("devtools/client/netmonitor/src/actions/index"); + store.dispatch(Actions.batchEnable(false)); - await teardown(monitor); + info("Starting test in private window... "); + await runTests(tab, monitor, document, true); + await teardown(monitor, privateWindow); }); ===================================== devtools/client/netmonitor/test/head.js ===================================== @@ -321,6 +321,7 @@ function initNetMonitor( expectedEventTimings, waitForLoad = true, enableCache = false, + openInPrivateWindow = false, } ) { info("Initializing a network monitor pane."); @@ -341,7 +342,22 @@ function initNetMonitor( ], }); - const tab = await addTab(url, { waitForLoad }); + let tab = null; + let privateWindow = null; + + if (openInPrivateWindow) { + privateWindow = await BrowserTestUtils.openNewBrowserWindow({ + private: true, + }); + ok( + PrivateBrowsingUtils.isContentWindowPrivate(privateWindow), + "window is private" + ); + tab = BrowserTestUtils.addTab(privateWindow.gBrowser, url); + } else { + tab = await addTab(url, { waitForLoad }); + } + info("Net tab added successfully: " + url); const toolbox = await gDevTools.showToolboxForTab(tab, { @@ -371,7 +387,7 @@ function initNetMonitor( await clearNetworkEvents(monitor); } - return { tab, monitor, toolbox }; + return { tab, monitor, toolbox, privateWindow }; })(); } @@ -408,7 +424,7 @@ async function clearNetworkEvents(monitor) { store.dispatch(Actions.clearRequests()); } -function teardown(monitor) { +function teardown(monitor, privateWindow) { info("Destroying the specified network monitor."); return (async function () { @@ -419,6 +435,12 @@ function teardown(monitor) { await monitor.toolbox.destroy(); await removeTab(tab); + + if (privateWindow) { + const closed = BrowserTestUtils.windowClosed(privateWindow); + privateWindow.BrowserCommands.tryToCloseWindow(); + await closed; + } })(); } View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/32a6f9… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/32a6f9… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.11.0esr-13.5-1] 2 commits: Revert "Bug 41740: Change the RFP value of devicePixelRatio to 2"
by richard (@richard) 13 May '24

13 May '24
richard pushed to branch mullvad-browser-115.11.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser Commits: 532087af by Pier Angelo Vendrame at 2024-05-13T19:56:57+00:00 Revert &quot;Bug 41740: Change the RFP value of devicePixelRatio to 2&quot; This reverts commit 94c39de65acb82efc7ecabbd7125f8d2aeb46d02. - - - - - bed64b83 by Fatih at 2024-05-13T19:56:57+00:00 Bug 1830629: Remove unnecessary checks for pdf.js for RFP. r=tjr resource:// is exempt from RFP, so we no longer need to check pdf.js specifically. Differential Revision: https://phabricator.services.mozilla.com/D209359 - - - - - 1 changed file: - dom/base/nsGlobalWindowInner.cpp Changes: ===================================== dom/base/nsGlobalWindowInner.cpp ===================================== @@ -3604,20 +3604,9 @@ double nsGlobalWindowInner::GetDevicePixelRatio(CallerType aCallerType, return 1.0; } - if (nsIGlobalObject::ShouldResistFingerprinting(aCallerType, - RFPTarget::Unknown)) { - // Spoofing the DevicePixelRatio causes blurriness in some situations - // on HiDPI displays. pdf.js is a non-system caller; but it can't - // expose the fingerprintable information, so we can safely disable - // spoofing in this situation. It doesn't address the issue for - // web-rendered content (including pdf.js instances on the web.) - // In the future we hope to have a better solution to fix all HiDPI - // blurriness... - nsAutoCString origin; - nsresult rv = this->GetPrincipal()->GetOrigin(origin); - if (NS_FAILED(rv) || origin != "resource://pdf.js"_ns) { - return 2.0; - } + if (nsIGlobalObject::ShouldResistFingerprinting( + aCallerType, RFPTarget::Unknown)) { + return 2.0; } if (aCallerType == CallerType::NonSystem) { View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/5e… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/5e… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-115.11.0esr-13.5-1] 2 commits: Revert "Bug 41740: Change the RFP value of devicePixelRatio to 2"
by richard (@richard) 13 May '24

13 May '24
richard pushed to branch base-browser-115.11.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: be35122b by Pier Angelo Vendrame at 2024-05-13T19:56:00+00:00 Revert &quot;Bug 41740: Change the RFP value of devicePixelRatio to 2&quot; This reverts commit 94c39de65acb82efc7ecabbd7125f8d2aeb46d02. - - - - - 3bed85e2 by Fatih at 2024-05-13T19:56:00+00:00 Bug 1830629: Remove unnecessary checks for pdf.js for RFP. r=tjr resource:// is exempt from RFP, so we no longer need to check pdf.js specifically. Differential Revision: https://phabricator.services.mozilla.com/D209359 - - - - - 1 changed file: - dom/base/nsGlobalWindowInner.cpp Changes: ===================================== dom/base/nsGlobalWindowInner.cpp ===================================== @@ -3604,20 +3604,9 @@ double nsGlobalWindowInner::GetDevicePixelRatio(CallerType aCallerType, return 1.0; } - if (nsIGlobalObject::ShouldResistFingerprinting(aCallerType, - RFPTarget::Unknown)) { - // Spoofing the DevicePixelRatio causes blurriness in some situations - // on HiDPI displays. pdf.js is a non-system caller; but it can't - // expose the fingerprintable information, so we can safely disable - // spoofing in this situation. It doesn't address the issue for - // web-rendered content (including pdf.js instances on the web.) - // In the future we hope to have a better solution to fix all HiDPI - // blurriness... - nsAutoCString origin; - nsresult rv = this->GetPrincipal()->GetOrigin(origin); - if (NS_FAILED(rv) || origin != "resource://pdf.js"_ns) { - return 2.0; - } + if (nsIGlobalObject::ShouldResistFingerprinting( + aCallerType, RFPTarget::Unknown)) { + return 2.0; } if (aCallerType == CallerType::NonSystem) { View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/1f7194… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/1f7194… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.11.0esr-13.5-1] 2 commits: Revert "Bug 41740: Change the RFP value of devicePixelRatio to 2"
by richard (@richard) 13 May '24

13 May '24
richard pushed to branch tor-browser-115.11.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 736fba53 by Pier Angelo Vendrame at 2024-05-13T17:49:22+02:00 Revert &quot;Bug 41740: Change the RFP value of devicePixelRatio to 2&quot; This reverts commit 94c39de65acb82efc7ecabbd7125f8d2aeb46d02. - - - - - 32a6f98c by Fatih at 2024-05-13T17:52:54+02:00 Bug 1830629: Remove unnecessary checks for pdf.js for RFP. r=tjr resource:// is exempt from RFP, so we no longer need to check pdf.js specifically. Differential Revision: https://phabricator.services.mozilla.com/D209359 - - - - - 1 changed file: - dom/base/nsGlobalWindowInner.cpp Changes: ===================================== dom/base/nsGlobalWindowInner.cpp ===================================== @@ -3604,20 +3604,9 @@ double nsGlobalWindowInner::GetDevicePixelRatio(CallerType aCallerType, return 1.0; } - if (nsIGlobalObject::ShouldResistFingerprinting(aCallerType, - RFPTarget::Unknown)) { - // Spoofing the DevicePixelRatio causes blurriness in some situations - // on HiDPI displays. pdf.js is a non-system caller; but it can't - // expose the fingerprintable information, so we can safely disable - // spoofing in this situation. It doesn't address the issue for - // web-rendered content (including pdf.js instances on the web.) - // In the future we hope to have a better solution to fix all HiDPI - // blurriness... - nsAutoCString origin; - nsresult rv = this->GetPrincipal()->GetOrigin(origin); - if (NS_FAILED(rv) || origin != "resource://pdf.js"_ns) { - return 2.0; - } + if (nsIGlobalObject::ShouldResistFingerprinting( + aCallerType, RFPTarget::Unknown)) { + return 2.0; } if (aCallerType == CallerType::NonSystem) { View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/8e9d5e… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/8e9d5e… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • ...
  • 745
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.