brizental pushed to branch tor-browser-140.3.0esr-15.0-1 at The Tor Project / Applications / Tor Browser

Commits:

3 changed files:

Changes:

  • browser/app/profile/001-base-profile.js
    ... ... @@ -1087,3 +1087,10 @@ pref("font.name-list.monospace.x-unicode", "Cousine, Noto Sans Balinese, Noto Sa
    1087 1087
     // The rest are not customized, because they are covered only by one font
    
    1088 1088
     #endif
    
    1089 1089
     #endif
    
    1090
    +
    
    1091
    +// tor-browser#42630: Disable LaterRun.
    
    1092
    +//
    
    1093
    +// This preference is set in a few places in code. Even though it's locked,
    
    1094
    +// setting it will still change the value in `prefs.js`, but it will be ignored.
    
    1095
    +// If this is ever unlocked, the value in prefs.js will be used.
    
    1096
    +pref("browser.laterrun.enabled", false, locked);

  • browser/components/ProfileDataUpgrader.sys.mjs
    ... ... @@ -913,7 +913,8 @@ export let ProfileDataUpgrader = {
    913 913
         //            hid its neterror checkbox. tor-browser#42653.
    
    914 914
         // Version 3: 14.0a7: Reset general.smoothScroll. tor-browser#42070.
    
    915 915
         // Version 4: 15.0a2: Drop ML components. tor-browser#44045.
    
    916
    -    const MIGRATION_VERSION = 4;
    
    916
    +    // Version 5: 15.0a3: Disable LaterRun using prefs. tor-browser#42630.
    
    917
    +    const MIGRATION_VERSION = 5;
    
    917 918
         const MIGRATION_PREF = "basebrowser.migration.version";
    
    918 919
     
    
    919 920
         if (isNewProfile) {
    
    ... ... @@ -972,6 +973,15 @@ export let ProfileDataUpgrader = {
    972 973
             Services.prefs.clearUserPref(prefName);
    
    973 974
           }
    
    974 975
         }
    
    976
    +    if (currentVersion < 5) {
    
    977
    +      for (const prefName of [
    
    978
    +        "browser.laterrun.bookkeeping.sessionCount",
    
    979
    +        "browser.laterrun.bookkeeping.profileCreationTime",
    
    980
    +        "browser.laterrun.bookkeeping.updateAppliedTime",
    
    981
    +      ]) {
    
    982
    +        Services.prefs.clearUserPref(prefName);
    
    983
    +      }
    
    984
    +    }
    
    975 985
         Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION);
    
    976 986
       },
    
    977 987
     
    

  • browser/modules/LaterRun.sys.mjs
    ... ... @@ -61,20 +61,6 @@ export let LaterRun = {
    61 61
       },
    
    62 62
     
    
    63 63
       init(reason) {
    
    64
    -    // Keep disabled in Base Browser. See tor-browser#41568.
    
    65
    -    // NOTE: This means that users cannot benefit from feature prompts gated
    
    66
    -    // behind LaterRun.
    
    67
    -    // In mozilla ESR 128 it is only used in one place, and is gated behind a
    
    68
    -    // feature recommendation preference that we switch off in Base Browser
    
    69
    -    // anyway. See tor-browser#42630.
    
    70
    -    // But this decision should be reviewed. See tor-browser#43093.
    
    71
    -    Services.prefs.setBoolPref(kEnabledPref, false);
    
    72
    -    // Clear any preferences that may have been set before LaterRun was
    
    73
    -    // disabled.
    
    74
    -    Services.prefs.clearUserPref(kSessionCountPref);
    
    75
    -    Services.prefs.clearUserPref(kProfileCreationTime);
    
    76
    -    Services.prefs.clearUserPref(kUpdateAppliedTime);
    
    77
    -
    
    78 64
         if (!this.enabled) {
    
    79 65
           return;
    
    80 66
         }
    
    ... ... @@ -113,8 +99,11 @@ export let LaterRun = {
    113 99
         return Services.prefs.getBoolPref(kEnabledPref, false);
    
    114 100
       },
    
    115 101
     
    
    116
    -  enable(_reason) {
    
    117
    -    // Keep disabled in Base Browser. See tor-browser#41568.
    
    102
    +  enable(reason) {
    
    103
    +    if (!this.enabled) {
    
    104
    +      Services.prefs.setBoolPref(kEnabledPref, true);
    
    105
    +      this.init(reason);
    
    106
    +    }
    
    118 107
       },
    
    119 108
     
    
    120 109
       get hoursSinceInstall() {