Bug 1344987 - remove SEARCH_SERVICE_HAS_UPDATES and SEARCH_SERVICE_HAS_ICON_UPDATES Telemetry probes, r=past a=tomcat

This commit is contained in:
Florian Quèze 2017-03-07 12:52:48 +01:00
Родитель dac8dc0c7b
Коммит 0189aaecf7
5 изменённых файлов: 0 добавлений и 78 удалений

Просмотреть файл

@ -4353,20 +4353,6 @@ SearchService.prototype = {
_recordEngineTelemetry() {
Services.telemetry.getHistogramById("SEARCH_SERVICE_ENGINE_COUNT")
.add(Object.keys(this._engines).length);
let hasUpdates = false;
let hasIconUpdates = false;
for (let name in this._engines) {
let engine = this._engines[name];
if (engine._hasUpdates) {
hasUpdates = true;
if (engine._iconUpdateURL) {
hasIconUpdates = true;
break;
}
}
}
Services.telemetry.getHistogramById("SEARCH_SERVICE_HAS_UPDATES").add(hasUpdates);
Services.telemetry.getHistogramById("SEARCH_SERVICE_HAS_ICON_UPDATES").add(hasIconUpdates);
},
/**

Просмотреть файл

@ -1,10 +0,0 @@
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>update</ShortName>
<Description>update</Description>
<InputEncoding>UTF-8</InputEncoding>
<Url type="text/html" method="GET" template="http://searchtest.local">
<Param name="search" value="{searchTerms}"/>
</Url>
<UpdateUrl>http://searchtest.local/opensearch.xml</UpdateUrl>
<IconUpdateUrl>http://searchtest.local/favicon.ico</IconUpdateUrl>
</SearchPlugin>

Просмотреть файл

@ -1,36 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
function run_test() {
do_check_false(Services.search.isInitialized);
useHttpServer();
run_next_test();
}
function checkTelemetry(histogramName, expected) {
let histogram = Services.telemetry.getHistogramById(histogramName);
let snapshot = histogram.snapshot();
let expectedCounts = [0, 0, 0];
expectedCounts[expected ? 1 : 0] = 1;
Assert.deepEqual(snapshot.counts, expectedCounts,
"histogram has expected content");
histogram.clear();
}
add_task(function* ignore_cache_files_without_engines() {
yield asyncInit();
checkTelemetry("SEARCH_SERVICE_HAS_UPDATES", false);
checkTelemetry("SEARCH_SERVICE_HAS_ICON_UPDATES", false);
// Add an engine with update urls and re-init, as we record the presence of
// engine update urls only while initializing the search service.
yield addTestEngines([
{ name: "update", xmlFileName: "engine-update.xml" },
]);
yield asyncReInit();
checkTelemetry("SEARCH_SERVICE_HAS_UPDATES", true);
checkTelemetry("SEARCH_SERVICE_HAS_ICON_UPDATES", true);
});

Просмотреть файл

@ -16,7 +16,6 @@ support-files =
data/engine-rel-searchform-post.xml
data/engine-rel-searchform-purpose.xml
data/engine-system-purpose.xml
data/engine-update.xml
data/engineImages.xml
data/engine-chromeicon.xml
data/engine-resourceicon.xml
@ -92,7 +91,6 @@ tags = addons
[test_hidden.js]
[test_currentEngine_fallback.js]
[test_require_engines_in_cache.js]
[test_update_telemetry.js]
[test_svg_icon.js]
[test_searchReset.js]
[test_addEngineWithDetails.js]

Просмотреть файл

@ -6626,22 +6626,6 @@
"n_buckets": 50,
"description": "Recorded once per session near startup: records the search plugin count, including both built-in plugins (including the ones the user has hidden) and user-installed plugins."
},
"SEARCH_SERVICE_HAS_UPDATES": {
"alert_emails": ["florian@mozilla.com"],
"expires_in_version": "55",
"kind": "boolean",
"bug_numbers": [1259510],
"description": "Recorded once per session near startup: records true/false whether the search service has engines with update URLs.",
"releaseChannelCollection": "opt-out"
},
"SEARCH_SERVICE_HAS_ICON_UPDATES": {
"alert_emails": ["florian@mozilla.com"],
"expires_in_version": "55",
"kind": "boolean",
"bug_numbers": [1259510],
"description": "Recorded once per session near startup: records true/false whether the search service has engines with icon update URLs.",
"releaseChannelCollection": "opt-out"
},
"SEARCH_SERVICE_COUNTRY_FETCH_TIME_MS": {
"alert_emails": ["mhammond@mozilla.com", "gavin@mozilla.com"],
"expires_in_version": "never",