Bug 1184974 - The submissionURL should not be recorded for packed add-ons in the profile. r=markh, a=lmandel
☠☠ backed out by 9d94a4679751 ☠ ☠
authorFlorian Quèze <florian@queze.net>
Tue, 21 Jul 2015 23:12:07 +0200
changeset 275428 9468920c54b3732e4f0025b6087c3a450d42b32e
parent 275427 54302ec0f509a730a03a4883a2e40de0d5eb8007
child 275429 e52fe64a174f4070ba38ab94c26fe3156ff2202a
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh, lmandel
bugs1184974
milestone40.0
Bug 1184974 - The submissionURL should not be recorded for packed add-ons in the profile. r=markh, a=lmandel
toolkit/components/search/nsSearchService.js
toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -4905,17 +4905,17 @@ SearchService.prototype = {
       if (engine.name)
         result.name = engine.name;
 
       result.loadPath = engine._anonymizedLoadPath;
 
       // For privacy, we only collect the submission URL for engines
       // from the application or distribution folder...
       let sendSubmissionURL =
-        /^(?:jar:|\[app\]|\[distribution\])/.test(result.loadPath);
+        /^(?:jar:)?(?:\[app\]|\[distribution\])/.test(result.loadPath);
 
       // ... or engines sorted by default near the top of the list.
       if (!sendSubmissionURL) {
         let extras =
           Services.prefs.getChildList(BROWSER_SEARCH_PREF + "order.extra.");
 
         for (let prefName of extras) {
           try {
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
@@ -965,18 +965,17 @@ add_task(function* test_defaultSearchEng
 
   // Our default engine from the JAR file has an identifier. Check if it is correctly
   // reported.
   data = TelemetryEnvironment.currentEnvironment;
   checkEnvironmentData(data);
   Assert.equal(data.settings.defaultSearchEngine, "telemetrySearchIdentifier");
   let expectedSearchEngineData = {
     name: "telemetrySearchIdentifier",
-    loadPath: "jar:[other]/searchTest.jar!testsearchplugin/telemetrySearchIdentifier.xml",
-    submissionURL: "http://ar.wikipedia.org/wiki/%D8%AE%D8%A7%D8%B5:%D8%A8%D8%AD%D8%AB?search=&sourceid=Mozilla-search"
+    loadPath: "jar:[other]/searchTest.jar!testsearchplugin/telemetrySearchIdentifier.xml"
   };
   Assert.deepEqual(data.settings.defaultSearchEngineData, expectedSearchEngineData);
 
   // Remove all the search engines.
   for (let engine of Services.search.getEngines()) {
     Services.search.removeEngine(engine);
   }
   // The search service does not notify "engine-default" when removing a default engine.