Skip to content

Commit ecac1ab

Browse files
committed
Prepare for switching accidental dev users to stable
The 3.3.2 release had a bug that accidentally put some percentage of stable users in the develoment branch. They then updated to 4.0development.10. We need to push a 4.0development.11 release that detects which users used to be on the stable branch and gives them a popup asking them if they would like to go back to stable.
1 parent 4648cdb commit ecac1ab

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

src/components/https-everywhere.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@ HTTPSEverywhere.prototype = {
503503
} else if (topic == "sessionstore-windows-restored") {
504504
this.log(DBUG,"Got sessionstore-windows-restored");
505505
this.maybeShowObservatoryPopup();
506+
this.maybeShowDevPopup();
506507
}
507508
return;
508509
},
@@ -527,6 +528,29 @@ HTTPSEverywhere.prototype = {
527528
ssl_observatory.registerProxyTestNotification(obs_popup_callback);
528529
},
529530

531+
maybeShowDevPopup: function() {
532+
/*
533+
* Users who installed 3.3.2 accidentally got upgraded to the
534+
* dev branch. We need to push this code to a dev release so
535+
* that they get a popup letting them know that they can switch
536+
* back to the stable branch if they want.
537+
*/
538+
var was_stable = true;
539+
var shown = this.prefs.getBoolPref("dev_popup_shown");
540+
try {
541+
// this pref should exist only for people who used to be stable
542+
// since getExperimentalFeatureCohort was never run in the
543+
// development channel
544+
this.prefs.getIntPref("experimental_feature_cohort");
545+
} catch(e) {
546+
was_stable = false;
547+
}
548+
if (was_stable && !shown) {
549+
this.prefs.setBoolPref("dev_popup_shown", true);
550+
this.chrome_opener("https://eff.org");
551+
}
552+
},
553+
530554
getExperimentalFeatureCohort: function() {
531555
// This variable is used for gradually turning on features for testing and
532556
// scalability purposes. It is a random integer [0,N_COHORTS) generated

src/defaults/preferences/preferences.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ pref("extensions.https_everywhere.globalEnabled",true);
44
// this is the HTTPS Everywhere preferences version (for migrations)
55
pref("extensions.https_everywhere.prefs_version", 0);
66

7+
// this is a popup asking whether the user really meant to be on the dev branch
8+
pref("extensions.https_everywhere.dev_popup_shown", false);
9+
710
// SSl Observatory preferences
811
pref("extensions.https_everywhere._observatory.enabled",false);
912

0 commit comments

Comments
 (0)