Bug 1456589 - Part 8 Remove unused telemetry calls and an accidently checked in file from SeaMonkey places. r=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Mon, 23 Jul 2018 22:14:42 +0200
changeset 24338 cd07afc8bcc3f64cd2718cfcf91f4eacc5ea5142
parent 24337 67150548fc03c0ea26bb149baa02910bb4e174d2
child 24339 06f9423311b107ce4bd927d1845ddbffab7bc1f5
push id14652
push userfrgrahl@gmx.net
push dateMon, 23 Jul 2018 20:17:58 +0000
treeherdercomm-central@07e930aae6f2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN
bugs1456589
Bug 1456589 - Part 8 Remove unused telemetry calls and an accidently checked in file from SeaMonkey places. r=IanN
suite/FIXME-PLACES.TXT
suite/components/places/content/browserPlacesViews.js
suite/components/places/content/history-panel.js
suite/components/places/content/places.js
deleted file mode 100644
--- a/suite/FIXME-PLACES.TXT
+++ /dev/null
@@ -1,20 +0,0 @@
-Check:
-comm-central/mozilla/browser/base/content/nsContextMenu.js
-suite/common/nsContextMenu.js
-
-addBookmarkForFrame: function CM_addBookmarkForFrame() {
-
-
-Not ported yet:
-
-Bug 1401238 - Deprecate Recent Bookmarks, and Pocket List from the Bookmarks Menu.
-https://bugzilla.mozilla.org/show_bug.cgi?id=1401238
-
-
-Non working:
-
-Load in sidebar disabled because of:
-Timestamp: 1/29/2018, 9:56:54 PM
-Error: TypeError: browserWin.openWebPanel is not a function
-Source File: resource:///modules/PlacesUIUtils.jsm
-Line: 1053
--- a/suite/components/places/content/browserPlacesViews.js
+++ b/suite/components/places/content/browserPlacesViews.js
@@ -989,19 +989,16 @@ function PlacesToolbar(aPlace) {
   // we have to track addition and removals of tabs, to properly
   // recalculate the available space for bookmarks.
   // TODO (bug 734730): Use a performant mutation listener when available.
   if (this._viewElt.parentNode.parentNode == document.getElementById("TabsToolbar")) {
     this._addEventListeners(gBrowser.tabContainer, ["TabOpen", "TabClose"], false);
   }
 
   PlacesViewBase.call(this, aPlace);
-
-  Services.telemetry.getHistogramById("FX_BOOKMARKS_TOOLBAR_INIT_MS")
-                    .add(Date.now() - startTime);
 }
 
 PlacesToolbar.prototype = {
   __proto__: PlacesViewBase.prototype,
 
   _cbEvents: ["dragstart", "dragover", "dragexit", "dragend", "drop",
               "mousemove", "mouseover", "mouseout"],
 
--- a/suite/components/places/content/history-panel.js
+++ b/suite/components/places/content/history-panel.js
@@ -1,15 +1,13 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/TelemetryStopwatch.jsm");
-
 var gHistoryTree;
 var gSearchBox;
 var gHistoryGrouping = "";
 var gSearching = false;
 
 function HistorySidebarInit() {
   gHistoryTree = document.getElementById("historyTree");
   gSearchBox = document.getElementById("search-box");
@@ -73,22 +71,16 @@ function searchHistory(aInput) {
       resultType = NHQO.RESULTS_AS_URI;
     }
   }
 
   options.sortingMode = sortingMode;
   options.resultType = resultType;
   options.includeHidden = !!aInput;
 
-  if (gHistoryGrouping == "lastvisited")
-    this.TelemetryStopwatch.start("HISTORY_LASTVISITED_TREE_QUERY_TIME_MS");
-
   // call load() on the tree manually
   // instead of setting the place attribute in history-panel.xul
   // otherwise, we will end up calling load() twice
   gHistoryTree.load([query], options);
-
-  if (gHistoryGrouping == "lastvisited")
-    this.TelemetryStopwatch.finish("HISTORY_LASTVISITED_TREE_QUERY_TIME_MS");
 }
 
 window.addEventListener("SidebarFocused",
                         () => gSearchBox.focus());
--- a/suite/components/places/content/places.js
+++ b/suite/components/places/content/places.js
@@ -3,32 +3,30 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* import-globals-from editBookmarkOverlay.js */
 /* import-globals-from ../../../../toolkit/content/contentAreaUtils.js */
 
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/TelemetryStopwatch.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 ChromeUtils.defineModuleGetter(this, "MigrationUtils",
                                "resource:///modules/MigrationUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "BookmarkJSONUtils",
                                "resource://gre/modules/BookmarkJSONUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "PlacesBackups",
                                "resource://gre/modules/PlacesBackups.jsm");
 ChromeUtils.defineModuleGetter(this, "DownloadUtils",
                                "resource://gre/modules/DownloadUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "OS",
                                "resource://gre/modules/osfile.jsm");
 
 const RESTORE_FILEPICKER_FILTER_EXT = "*.json;*.jsonlz4";
-const HISTORY_LIBRARY_SEARCH_TELEMETRY = "PLACES_HISTORY_LIBRARY_SEARCH_TIME_MS";
 
 var PlacesOrganizer = {
   _places: null,
 
   // IDs of fields from editBookmarkOverlay that should be hidden when infoBox
   // is minimal. IDs should be kept in sync with the IDs of the elements
   // observing additionalInfoBroadcaster.
   _additionalInfoFields: [
@@ -372,17 +370,17 @@ var PlacesOrganizer = {
     return PlacesUtils.asQuery(ContentArea.currentView.result.root).getQueries();
   },
 
   /**
    * Show the migration wizard for importing passwords,
    * cookies, history, preferences, and bookmarks.
    */
   importFromBrowser: function PO_importFromBrowser() {
-    // We pass in the type of source we're using for use in telemetry:
+    // We pass in the type of source we're using for future use:
     MigrationUtils.showMigrationWizard(window, [MigrationUtils.MIGRATION_ENTRYPOINT_PLACES]);
   },
 
   /**
    * Open a file-picker and import the selected file into the bookmarks store
    */
   importFromFile: function PO_importFromFile() {
     let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
@@ -807,19 +805,17 @@ var PlacesSearchBox = {
           query.searchTerms = filterString;
           let options = currentOptions.clone();
           // Make sure we're getting uri results.
           options.resultType = currentOptions.RESULTS_AS_URI;
           options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY;
           options.includeHidden = true;
           currentView.load([query], options);
         } else {
-          TelemetryStopwatch.start(HISTORY_LIBRARY_SEARCH_TELEMETRY);
           currentView.applyFilter(filterString, null, true);
-          TelemetryStopwatch.finish(HISTORY_LIBRARY_SEARCH_TELEMETRY);
         }
         break;
       }
       default:
         throw "Invalid filterCollection on search";
     }
 
     // Update the details panel