Bug 1560741 - Part 2: Remove the now unneeded PERMISSION_REQUEST_THIRD_PARTY_ORIGIN telemetry probe; r=johannh
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 12 Aug 2019 21:39:05 +0000
changeset 487530 efe5dc48aa87d8b76a3b4a65653b00986343988b
parent 487529 b7c91018f87ee89c7b209b76a0202be118cdff32
child 487531 d07875a4f37441f92045e491b07b0f7fe0f6de97
push id36425
push userbtara@mozilla.com
push dateTue, 13 Aug 2019 09:54:32 +0000
treeherdermozilla-central@e29ba984dad2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1560741
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1560741 - Part 2: Remove the now unneeded PERMISSION_REQUEST_THIRD_PARTY_ORIGIN telemetry probe; r=johannh Differential Revision: https://phabricator.services.mozilla.com/D41306
browser/components/BrowserGlue.jsm
browser/modules/webrtcUI.jsm
toolkit/components/telemetry/Histograms.json
--- a/browser/components/BrowserGlue.jsm
+++ b/browser/components/BrowserGlue.jsm
@@ -3960,26 +3960,16 @@ ContentPermissionPrompt.prototype = {
       // user. We shouldn't record this request.
       if (ex.result != Cr.NS_ERROR_FAILURE) {
         Cu.reportError(ex);
       }
       return;
     }
     schemeHistogram.add(type, scheme);
 
-    // request.element should be the browser element in e10s.
-    if (request.element && request.element.contentPrincipal) {
-      let thirdPartyHistogram = Services.telemetry.getKeyedHistogramById(
-        "PERMISSION_REQUEST_THIRD_PARTY_ORIGIN"
-      );
-      let isThirdParty =
-        request.principal.origin != request.element.contentPrincipal.origin;
-      thirdPartyHistogram.add(type, isThirdParty);
-    }
-
     let userInputHistogram = Services.telemetry.getKeyedHistogramById(
       "PERMISSION_REQUEST_HANDLING_USER_INPUT"
     );
     userInputHistogram.add(type, request.isHandlingUserInput);
   },
 };
 
 var DefaultBrowserCheck = {
--- a/browser/modules/webrtcUI.jsm
+++ b/browser/modules/webrtcUI.jsm
@@ -1147,19 +1147,16 @@ function prompt(aBrowser, aRequest) {
     secondaryActions,
     options
   );
   notification.callID = aRequest.callID;
 
   let schemeHistogram = Services.telemetry.getKeyedHistogramById(
     "PERMISSION_REQUEST_ORIGIN_SCHEME"
   );
-  let thirdPartyHistogram = Services.telemetry.getKeyedHistogramById(
-    "PERMISSION_REQUEST_THIRD_PARTY_ORIGIN"
-  );
   let userInputHistogram = Services.telemetry.getKeyedHistogramById(
     "PERMISSION_REQUEST_HANDLING_USER_INPUT"
   );
 
   let docURI = aRequest.documentURI;
   let scheme = 0;
   if (docURI.startsWith("https")) {
     scheme = 2;
@@ -1169,17 +1166,16 @@ function prompt(aBrowser, aRequest) {
 
   for (let requestType of requestTypes) {
     if (requestType == "AudioCapture") {
       requestType = "Microphone";
     }
     requestType = requestType.toLowerCase();
 
     schemeHistogram.add(requestType, scheme);
-    thirdPartyHistogram.add(requestType, aRequest.isThirdPartyOrigin);
     userInputHistogram.add(requestType, aRequest.isHandlingUserInput);
   }
 }
 
 function removePrompt(aBrowser, aCallId) {
   let chromeWin = aBrowser.ownerGlobal;
   let notification = chromeWin.PopupNotifications.getNotification(
     "webRTC-shareDevices",
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -15172,26 +15172,16 @@
     "alert_emails": ["jhofmann@mozilla.com"],
     "bug_numbers": [1345077, 1494589],
     "expires_in_version": "70",
     "kind": "enumerated",
     "n_values": 10,
     "keyed": true,
     "description": "Permission requests (showing a permission prompt) by origin scheme (0=other,1=http,2=https)."
   },
-  "PERMISSION_REQUEST_THIRD_PARTY_ORIGIN": {
-    "record_in_processes": ["main"],
-    "products": ["firefox", "fennec", "geckoview"],
-    "alert_emails": ["jhofmann@mozilla.com"],
-    "bug_numbers": [1345077, 1494589],
-    "expires_in_version": "70",
-    "kind": "boolean",
-    "keyed": true,
-    "description": "Permission requests (showing a permission prompt) by whether they come from a third party origin."
-  },
   "PERMISSION_REQUEST_HANDLING_USER_INPUT": {
     "record_in_processes": ["main"],
     "products": ["firefox", "fennec", "geckoview"],
     "alert_emails": ["jhofmann@mozilla.com"],
     "bug_numbers": [1345077, 1494589],
     "expires_in_version": "70",
     "kind": "boolean",
     "keyed": true,