Bug 1501592 - remove remaining expired feed telemetry, r=mak
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Thu, 25 Oct 2018 10:52:59 +0000
changeset 491307 25c9834781deba0c15438e8b3583b2f2c77a2124
parent 491306 fdb31d77a4e956944ed305584f741482c08faa0f
child 491308 c06ff6513da3846cd059f0e0854848c6e5fa6261
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersmak
bugs1501592
milestone65.0a1
Bug 1501592 - remove remaining expired feed telemetry, r=mak Differential Revision: https://phabricator.services.mozilla.com/D9665
browser/components/places/PlacesUIUtils.jsm
browser/components/places/content/browserPlacesViews.js
toolkit/components/places/PlacesDBUtils.jsm
toolkit/components/telemetry/Scalars.yaml
--- a/browser/components/places/PlacesUIUtils.jsm
+++ b/browser/components/places/PlacesUIUtils.jsm
@@ -709,20 +709,16 @@ var PlacesUIUtils = {
         where = "tab";
       }
       if (where == "tab" && browserWindow.isTabEmpty(browserWindow.gBrowser.selectedTab)) {
         where = "current";
       }
     }
 
     this._openNodeIn(aNode, where, window);
-    let view = this.getViewForNode(aEvent.target);
-    if (view && view.controller.hasCachedLivemarkInfo(aNode.parent)) {
-      Services.telemetry.scalarAdd("browser.feeds.livebookmark_item_opened", 1);
-    }
   },
 
   /**
    * Loads the node's URL in the appropriate tab or window.
    * see also openUILinkIn
    */
   openNodeIn: function PUIU_openNodeIn(aNode, aWhere, aView, aPrivate) {
     let window = aView.ownerWindow;
--- a/browser/components/places/content/browserPlacesViews.js
+++ b/browser/components/places/content/browserPlacesViews.js
@@ -927,19 +927,16 @@ PlacesViewBase.prototype = {
     // Remove any delayed element, see _cleanPopup for details.
     if ("_delayedRemovals" in popup) {
       while (popup._delayedRemovals.length > 0) {
         popup.removeChild(popup._delayedRemovals.shift());
       }
     }
 
     if (popup._placesNode && PlacesUIUtils.getViewForNode(popup) == this) {
-      if (this.controller.hasCachedLivemarkInfo(popup._placesNode)) {
-        Services.telemetry.scalarAdd("browser.feeds.livebookmark_opened", 1);
-      }
       if (!popup._placesNode.containerOpen)
         popup._placesNode.containerOpen = true;
       if (!popup._built)
         this._rebuildPopup(popup);
 
       this._mayAddCommandsItems(popup);
     }
   },
--- a/toolkit/components/places/PlacesDBUtils.jsm
+++ b/toolkit/components/places/PlacesDBUtils.jsm
@@ -973,19 +973,16 @@ var PlacesDBUtils = {
   /**
    * Collects telemetry data and reports it to Telemetry.
    *
    * Note: although this function isn't actually async, we keep it async to
    * allow us to maintain a simple, consistent API for the tasks within this object.
    *
    */
   async telemetry() {
-    // First deal with some scalars for feeds:
-    await this._telemetryForFeeds();
-
     // This will be populated with one integer property for each probe result,
     // using the histogram name as key.
     let probeValues = {};
 
     // The following array contains an ordered list of entries that are
     // processed to collect telemetry data.  Each entry has these properties:
     //
     //  histogram: Name of the telemetry histogram to update.
@@ -1123,26 +1120,16 @@ var PlacesDBUtils = {
       if ("callback" in probe) {
         val = await probe.callback(val);
       }
       probeValues[probe.histogram] = val;
       Services.telemetry.getHistogramById(probe.histogram).add(val);
     }
   },
 
-  async _telemetryForFeeds() {
-    let db = await PlacesUtils.promiseDBConnection();
-    let livebookmarkCount = await db.execute(
-      `SELECT count(*) FROM moz_items_annos a
-                       JOIN moz_anno_attributes aa ON a.anno_attribute_id = aa.id
-                       WHERE aa.name = 'livemark/feedURI'`);
-    livebookmarkCount = livebookmarkCount[0].getResultByIndex(0);
-    Services.telemetry.scalarSet("browser.feeds.livebookmark_count", livebookmarkCount);
-  },
-
   /**
    * Runs a list of tasks, returning a Map when done.
    *
    * @param tasks
    *        Array of tasks to be executed, in form of pointers to methods in
    *        this module.
    * @return {Promise}
    *        A promise that resolves with a Map[taskName(String) -> Object].
--- a/toolkit/components/telemetry/Scalars.yaml
+++ b/toolkit/components/telemetry/Scalars.yaml
@@ -261,84 +261,16 @@ browser.engagement.navigation:
     kind: uint
     keyed: true
     notification_emails:
       - mkaply@mozilla.com
     release_channel_collection: opt-out
     record_in_processes:
       - 'main'
 
-# The following section contains (RSS/Atom) feed usage
-browser.feeds:
-  preview_loaded:
-    bug_numbers:
-      - 1350349
-    description: >
-      The number of times a feed preview page is loaded.
-    expires: "65"
-    kind: uint
-    notification_emails:
-      - gijs@mozilla.com
-    release_channel_collection: opt-out
-    record_in_processes:
-      - 'main'
-      - 'content'
-
-  feed_subscribed:
-    bug_numbers:
-      - 1350349
-    description: >
-      The number of times a user subscribes to a feed.
-    expires: "65"
-    kind: uint
-    notification_emails:
-      - gijs@mozilla.com
-    release_channel_collection: opt-out
-    record_in_processes:
-      - 'main'
-
-  livebookmark_opened:
-    bug_numbers:
-      - 1350349
-    description: >
-      The number of times a user opens a live bookmark dropdown.
-    expires: "65"
-    kind: uint
-    notification_emails:
-      - gijs@mozilla.com
-    release_channel_collection: opt-out
-    record_in_processes:
-      - 'main'
-
-  livebookmark_item_opened:
-    bug_numbers:
-      - 1350349
-    description: >
-      The number of times a user opens an item that is part of a live bookmark.
-    expires: "65"
-    kind: uint
-    notification_emails:
-      - gijs@mozilla.com
-    release_channel_collection: opt-out
-    record_in_processes:
-      - 'main'
-
-  livebookmark_count:
-    bug_numbers:
-      - 1350349
-    description: >
-      The number of live bookmark folders the user has (ie not individual items).
-    expires: "65"
-    kind: uint
-    notification_emails:
-      - gijs@mozilla.com
-    release_channel_collection: opt-out
-    record_in_processes:
-      - 'main'
-
 # The following section contains the browser usage scalars.
 browser.usage:
   graphite:
     bug_numbers:
       - 1331915
     description: >
       The number of times a graphite2 font has been loaded.
     expires: "65"