Bug 1544077 - Remove unused recordSearchURLTelemetry idl definition. r=Standard8
authorDale Harvey <dale@arandomurl.com>
Tue, 16 Apr 2019 15:50:50 +0000
changeset 469766 da7521e9da92
parent 469765 7c149c2cd4a9
child 469767 35f6fc828d61
push id35882
push usercbrindusan@mozilla.com
push dateWed, 17 Apr 2019 15:54:01 +0000
treeherdermozilla-central@37185c0ae520 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs1544077
milestone68.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 1544077 - Remove unused recordSearchURLTelemetry idl definition. r=Standard8 Differential Revision: https://phabricator.services.mozilla.com/D27725
browser/components/search/SearchTelemetry.jsm
browser/modules/test/browser/browser_UsageTelemetry_urlbar.js
toolkit/components/search/nsISearchService.idl
--- a/browser/components/search/SearchTelemetry.jsm
+++ b/browser/components/search/SearchTelemetry.jsm
@@ -361,17 +361,17 @@ class TelemetryHandler {
    * @param {string} info.type The type of search.
    * @param {string} [info.code] The code for the provider.
    * @param {string} url The url that was matched (for debug logging only).
    */
   _reportSerpPage(info, url) {
     let payload = `${info.provider}.in-content:${info.type}:${info.code || "none"}`;
     let histogram = Services.telemetry.getKeyedHistogramById(SEARCH_COUNTS_HISTOGRAM_KEY);
     histogram.add(payload);
-    LOG(`SearchTelemetry::recordSearchURLTelemetry: ${payload} for ${url}`);
+    LOG(`SearchTelemetry: ${payload} for ${url}`);
   }
 
   /**
    * Returns the current search provider information in use.
    * @see SEARCH_PROVIDER_INFO
    */
   get _searchProviderInfo() {
     if (!this.__searchProviderInfo) {
@@ -485,17 +485,17 @@ class ContentHandler {
       }
 
       let info = this._getProviderInfoForUrl(uri.spec, true);
       if (!info) {
         return;
       }
 
       Services.telemetry.keyedScalarAdd(SEARCH_AD_CLICKS_SCALAR, info[0], 1);
-      LOG(`SearchTelemetry::recordSearchURLTelemetry: Counting ad click in page for ${info[0]} ${triggerURI.spec}`);
+      LOG(`SearchTelemetry: Counting ad click in page for ${info[0]} ${triggerURI.spec}`);
     } catch (e) {
       Cu.reportError(e);
     }
   }
 
   /**
    * Adds a message listener for the window being registered to receive messages
    * from SearchTelemetryChild.
@@ -526,17 +526,17 @@ class ContentHandler {
   _reportPageWithAds(info) {
     let item = this._browserInfoByUrl.get(info.url);
     if (!item) {
       LOG(`Expected to report URI with ads but couldn't find the information`);
       return;
     }
 
     Services.telemetry.keyedScalarAdd(SEARCH_WITH_ADS_SCALAR, item.info.provider, 1);
-    LOG(`SearchTelemetry::recordSearchURLTelemetry: Counting ads in page for ${item.info.provider} ${info.url}`);
+    LOG(`SearchTelemetry: Counting ads in page for ${item.info.provider} ${info.url}`);
   }
 }
 
 /**
  * Outputs the message to the JavaScript console as well as to stdout.
  *
  * @param {string} msg The message to output.
  */
--- a/browser/modules/test/browser/browser_UsageTelemetry_urlbar.js
+++ b/browser/modules/test/browser/browser_UsageTelemetry_urlbar.js
@@ -503,19 +503,18 @@ add_task(async function test_suggestion_
     TelemetryTestUtils.assertHistogram(resultMethodHist,
       URLBAR_SELECTED_RESULT_METHODS.rightClickEnter, 1);
 
     BrowserTestUtils.removeTab(tab);
   });
 });
 
 add_task(async function test_privateWindow() {
-  // Mock the search telemetry search provider info so that its
-  // recordSearchURLTelemetry() function adds the in-content SEARCH_COUNTS
-  // telemetry for our test engine.
+  // Override the search telemetry search provider info to
+  // count in-content SEARCH_COUNTs telemetry for our test engine.
   SearchTelemetry.overrideSearchTelemetryForTests({
     "example": {
       "regexp": "^http://example\\.com/",
       "queryParam": "q",
     },
   });
 
   let search_hist = TelemetryTestUtils.getAndClearKeyedHistogram("SEARCH_COUNTS");
--- a/toolkit/components/search/nsISearchService.idl
+++ b/toolkit/components/search/nsISearchService.idl
@@ -494,26 +494,16 @@ interface nsISearchService : nsISupports
    * The expected URI parameter for the search terms must exist in the query
    * string, but other parameters are ignored.
    *
    * @param url
    *        String containing the URL to parse, for example
    *        "https://www.google.com/search?q=terms".
    */
   nsISearchParseSubmissionResult parseSubmissionURL(in AString url);
-
-  /**
-   * Determines if a URL is related to search and if so, records the
-   * appropriate telemetry.
-   *
-   * @param url
-   *        String containing the URL to parse, for example
-   *        "https://www.google.com/search?q=terms".
-   */
-  boolean recordSearchURLTelemetry(in AString url);
 };
 
 %{ C++
 /**
  * The observer topic to listen to for actions performed on installed
  * search engines.
  */
 #define SEARCH_ENGINE_TOPIC "browser-search-engine-modified"