Bug 1248813 - Telemetry experiment for plugin content blocking. r=felipe
authorTobias Schneider <schneider@jancona.com>
Fri, 29 Apr 2016 13:43:02 -0700
changeset 89 e59fef380ae0af04a8308c70ca347d292d5bf839
parent 88 622394b19688eb2475c4b21d7e48289c0e3fa46f
child 90 3491bc57e173cfac936dd7edb3a76b7da2b8f775
push id66
push usercpeterson@mozilla.com
push dateTue, 03 May 2016 21:21:33 +0000
reviewersfelipe
bugs1248813
Bug 1248813 - Telemetry experiment for plugin content blocking. r=felipe
experiments/plugin-block-beta47/code/bootstrap.js
experiments/plugin-block-beta47/code/install.rdf
experiments/plugin-block-beta47/experiment.xpi
experiments/plugin-block-beta47/manifest.json
new file mode 100644
--- /dev/null
+++ b/experiments/plugin-block-beta47/code/bootstrap.js
@@ -0,0 +1,74 @@
+let {classes: Cc, interfaces: Ci, utils: Cu} = Components;
+
+Cu.import("resource:///modules/experiments/Experiments.jsm");
+Cu.import("resource://gre/modules/Task.jsm");
+Cu.import("resource://gre/modules/Preferences.jsm");
+Cu.import("resource://gre/modules/Services.jsm");
+
+var gStarted = false;
+
+const kSELF_ID = "plugin-block-beta47@experiments.mozilla.org";
+
+function startup() {
+  // Seems startup() function is launched twice after install, we're
+  // unsure why so far. We only want it to run once.
+  // Also, skip experiment if e10s is enabled.
+  if (gStarted || Services.appinfo.browserTabsRemoteAutostart) {
+    return;
+  }
+  gStarted = true;
+
+  ensureExperimentBranch().then(branch => {
+    let defaultPrefs = new Preferences({defaultBranch: true});
+    switch (branch) {
+      case "control":
+        defaultPrefs.set("browser.safebrowsing.blockedURIs.enabled", false);
+        return;
+      case "conservative":
+        defaultPrefs.set("browser.safebrowsing.blockedURIs.enabled", true);
+        defaultPrefs.set("urlclassifier.blockedTable",
+                         "test-block-simple,mozplugin-block-digest256");
+        return;
+      case "aggressive":
+        defaultPrefs.set("browser.safebrowsing.blockedURIs.enabled", true);
+        defaultPrefs.set("urlclassifier.blockedTable",
+                         "test-block-simple,mozplugin2-block-digest256");
+        return;
+      default:
+        throw new Error("Unexpected experiment branch: " + branch);
+    }
+  }, e => {
+
+    Cu.reportError("Got error during bootstrap startup: " + e);
+
+  });
+}
+
+function shutdown() {
+  gStarted = false;
+}
+
+function ensureExperimentBranch() {
+  return new Promise(resolve => {
+  // TESTING CODE
+    try {
+      let forcedBranch =
+        Services.prefs.getCharPref("browser.safebrowsing.experiment.blocking");
+      resolve(forcedBranch);
+    } catch (ex) { }
+    let experiments = Experiments.instance();
+    // This experiment has 3 user groups:
+    //  * "control"       : No plugin blocking.
+    //  * "conservative"  : Block fingerprinting and supercookie SWFs.
+    //  * "aggressive"    : Block fingerprinting, supercookie, *and* ad viewability SWFs.
+    let branch = experiments.getActiveExperimentBranch();
+    if (branch) {
+      resolve(branch);
+      return;
+    }
+    let groups = ["control", "conservative", "aggressive"];
+    branch = groups[Math.floor(Math.random() * 3)];
+    let id = experiments.getActiveExperimentID();
+    experiments.setExperimentBranch(id, branch).then(() => resolve(branch));
+  });
+}
new file mode 100644
--- /dev/null
+++ b/experiments/plugin-block-beta47/code/install.rdf
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+  <Description about="urn:mozilla:install-manifest">
+    <em:id>plugin-block-beta47@experiments.mozilla.org</em:id>
+    <em:version>1.0.1</em:version>
+    <em:type>128</em:type>
+    <em:bootstrap>true</em:bootstrap>
+    <em:unpack>false</em:unpack>
+
+    <!-- Firefox -->
+    <em:targetApplication>
+      <Description>
+        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+        <em:minVersion>47.0b2</em:minVersion>
+        <em:maxVersion>47.*</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+
+    <!-- Front End MetaData -->
+    <em:name>Plugin Block Testing</em:name>
+    <em:description>Measuring the effect of blocking plugin content on crashes, hangs, and other browser jank.</em:description>
+    <em:aboutURL>https://bugz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ATjq#YrT)(cQH+_J$<U8DW`iQv2SG$Z2
zzl!A#@EzE)q}<|f8$apc*43X560Dm<4f;+Rc$HDCCdP`5+ch>-vyk7*$ajW7VS`Q%
zHMOzLX3W9?u+E5vwqPtRhH~9r<viD_bv&oGgoGSv8t@~{!QelOki28HR(2NocG33%
zh{UIDM}D(znarzzup8!w%@HXvlmTtsxbY4<iazkZPv>2)9Ua>RiHdVNywH0FntgN@
zP42JTiFj%3&|XN8$Q_obNG{BHb-{b^Gzm%w<S{7;*DQkWDAoX*3Q46R-+bQK+B$!F
zWLz`-xDCc~(8#Xsxh&ENc$6;+D#`$1@>@bfy5TkdgEBjc&ORLYtr5cilQOe%aj>-k
zdU842g2y#Jgz``fo`cNgPh^GOE$46K^A)N=z0+B3TA~8Uc%!f1Og<dU|1qb+-7azV
zX_LU6u>wCXHB|x)Dt@%UjW%HVg^Cyh)77M%n@vv6e{{|n3bIni7pF*Kv|Vlrt?qkx
zmgu-&Yw-U@HvgPRS*iya7pe58UL657QJPPqmGCIRth}T5+?*6^(`C9sUrTq5$$2DB
zk5FF5ncMGEMw8g~ba~j+fD_*laWr7A?DL7VFEi8g`EDUTUv{@*BKA{X|M6_J15+=@
z-<t35P4I6_A<z~up$b#sVC7Vv#Zuv9n;3&NX!FeQZCrTq&Uy{2YH)H*UaO6bsv`bT
zMaY5J`OUPcbJ`R^MZ5!HoIrvjdqtem*|{}Df&z;-l{_+|#3#+qP*k66o3PlL=|0Se
zxa|%UnUdkV<lznvr>O#uK#2I?Y0UqVAb7a{LTdiyfeP`zf9QY7U&ckj!dU<Dz5jp1
zf9v*t8|vcxXYc=K(*Fd~-%0Zk{5!1v>EWL>`P%~<;lEZ$Qw162uM5b(m+<ef1OFTM
Fe*p2+ZvX%Q
new file mode 100644
--- /dev/null
+++ b/experiments/plugin-block-beta47/manifest.json
@@ -0,0 +1,18 @@
+{
+  "publish"     : true,
+  "priority"    : 2,
+  "name"        : "Plugin Block Testing",
+  "description" : "Measuring the effect of blocking plugin content on crashes, hangs, and other browser jank.",
+  "info"        : "<p><a href=\"https://bugzilla.mozilla.org/show_bug.cgi?id=1237198\">Related bug</a></p>",
+  "manifest"    : {
+    "id"               : "plugin-block-beta47@experiments.mozilla.org",
+    "startTime"        : 1462147200,
+    "endTime"          : 1463961600,
+    "maxActiveSeconds" : 1814400,
+    "appName"          : ["Firefox"],
+    "channel"          : ["beta"],
+    "minVersion"       : "47.0b3",
+    "maxVersion"       : "47.*",
+    "sample"           : 0.1
+  }
+}