зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1344987 - remove SEARCH_SERVICE_HAS_UPDATES and SEARCH_SERVICE_HAS_ICON_UPDATES Telemetry probes, r=past a=tomcat
This commit is contained in:
Родитель
dac8dc0c7b
Коммит
0189aaecf7
|
@ -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",
|
||||
|
|
Загрузка…
Ссылка в новой задаче