Skip to content

Instantly share code, notes, and snippets.

@rhelmer
Last active September 6, 2018 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhelmer/399e24e64b11bb20363b60237dae3ded to your computer and use it in GitHub Desktop.
Save rhelmer/399e24e64b11bb20363b60237dae3ded to your computer and use it in GitHub Desktop.
diff --git a/browser/app/moz.build b/browser/app/moz.build
--- a/browser/app/moz.build
+++ b/browser/app/moz.build
@@ -125,6 +125,9 @@ if CONFIG['MOZ_LINUX_32_SSE2_STARTUP_ERR
'-mno-sse', '-mno-sse2', '-mfpmath=387',
]
+if CONFIG['LIBPRIO']:
+ DEFINES['MOZ_LIBPRIO'] = True
+
for icon in ('firefox', 'document', 'newwindow', 'newtab', 'pbmode'):
DEFINES[icon.upper() + '_ICO'] = '"%s/%s/%s.ico"' % (
TOPSRCDIR, CONFIG['MOZ_BRANDING_DIRECTORY'], icon)
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1759,11 +1759,23 @@ pref("app.shield.optoutstudies.enabled",
pref("intl.multilingual.enabled", false);
// Prio preferences
+// Only enable by default on Nightly.
+// On platforms that do not build libprio, do not set these prefs at all, which gives us a way to detect support.
+
// Curve25519 public keys for Prio servers
+#ifdef MOZ_LIBPRIO
pref("prio.publicKeyA", "35AC1C7576C7C6EDD7FED6BCFC337B34D48CB4EE45C86BEEFB40BD8875707733");
pref("prio.publicKeyB", "26E6674E65425B823F1F1D5F96E3BB3EF9E406EC7FBA7DEF8B08A35DD135AF50");
+#endif
-#ifdef NIGHTLY_BUILD
+// Whether or not Prio-encoded Telemetry will be sent along with the main ping.
+#if defined(NIGHTLY_BUILD) && defined(MOZ_LIBPRIO)
+pref("prio.enabled", true);
+#elifdef MOZ_LIBPRIO
+pref("prio.enabled", false);
+#endif
+
+#if defined(NIGHTLY_BUILD)
pref("browser.fastblock.enabled", true);
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment