Bug 1301715 - Only extract metadata if the Activity Stream or Nightly flag is enabled. r?ahunt draft
authorSebastian Kaspari <s.kaspari@gmail.com>
Fri, 30 Sep 2016 11:58:25 -0400
changeset 419525 65b47e76d951eaf78c57082c73209f2bacc800e2
parent 417167 66f1fa26ab65c2e973f6f9d21824a8c5e3aa24dd
child 532595 caf8f46bd25e3dbf01589b6744431d7087b9817c
push id30953
push users.kaspari@gmail.com
push dateFri, 30 Sep 2016 15:59:03 +0000
reviewersahunt
bugs1301715
milestone52.0a1
Bug 1301715 - Only extract metadata if the Activity Stream or Nightly flag is enabled. r?ahunt MozReview-Commit-ID: 7Ic8v1M6AAy
mobile/android/chrome/content/browser.js
toolkit/modules/AppConstants.jsm
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -3938,17 +3938,19 @@ Tab.prototype = {
           let listener = function() {
             this.browser.removeEventListener("click", ErrorPageEventHandler, true);
             this.browser.removeEventListener("pagehide", listener, true);
           }.bind(this);
 
           this.browser.addEventListener("pagehide", listener, true);
         }
 
-        WebsiteMetadata.parseAsynchronously(this.browser.contentDocument);
+        if (AppConstants.NIGHTLY_BUILD || AppConstants.MOZ_ANDROID_ACTIVITY_STREAM) {
+          WebsiteMetadata.parseAsynchronously(this.browser.contentDocument);
+        }
 
         break;
       }
 
       case "DOMFormHasPassword": {
         LoginManagerContent.onDOMFormHasPassword(aEvent,
                                                  this.browser.contentWindow);
 
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -290,16 +290,23 @@ this.AppConstants = Object.freeze({
 
   MOZ_ENABLE_PROFILER_SPS:
 #ifdef MOZ_ENABLE_PROFILER_SPS
   true,
 #else
   false,
 #endif
 
+  MOZ_ANDROID_ACTIVITY_STREAM:
+#ifdef MOZ_ANDROID_ACTIVITY_STREAM
+  true,
+#else
+  false,
+#endif
+
   DLL_PREFIX: "@DLL_PREFIX@",
   DLL_SUFFIX: "@DLL_SUFFIX@",
 
   MOZ_APP_NAME: "@MOZ_APP_NAME@",
   MOZ_APP_VERSION: "@MOZ_APP_VERSION@",
   MOZ_APP_VERSION_DISPLAY: "@MOZ_APP_VERSION_DISPLAY@",
   MOZ_BUILD_APP: "@MOZ_BUILD_APP@",
   MOZ_MACBUNDLE_NAME: "@MOZ_MACBUNDLE_NAME@",