Backed out changeset 75a14f02f6f7 (bug 1330315) for build failures in TelemetryHistogramData.inc a=backout

MozReview-Commit-ID: KKnLXDjgmqC

--HG--
extra : rebase_source : 29e2b567cd0bc75cc4e0b22af20c7efaeb73a259
This commit is contained in:
Wes Kocher 2017-05-10 10:45:18 -07:00
Родитель 476caecbe9
Коммит ea3b6b9f1e
20 изменённых файлов: 36 добавлений и 56 удалений

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

@ -22,7 +22,7 @@
used as they only apply to Cocoa widget builds. All version of Firefox
through Firefox 2 will use Carbon widgets. -->
<menupopup id="menu_ToolsPopup">
<menuitem id="menu_preferences" label="&preferencesCmdMac.label;" key="key_preferencesCmdMac" oncommand="openPreferences(undefined, {origin: 'commandLineLegacy'});"/>
<menuitem id="menu_preferences" label="&preferencesCmdMac.label;" key="key_preferencesCmdMac" oncommand="openPreferences();"/>
<menuitem id="menu_mac_services" label="&servicesMenuMac.label;"/>
<menuitem id="menu_mac_hide_app" label="&hideThisAppCmdMac2.label;" key="key_hideThisAppCmdMac"/>
<menuitem id="menu_mac_hide_others" label="&hideOtherAppsCmdMac.label;" key="key_hideOtherAppsCmdMac"/>

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

@ -69,9 +69,9 @@ var gDataNotificationInfoBar = {
// The advanced subpanes are only supported in the old organization, which will
// be removed by bug 1349689.
if (Preferences.get("browser.preferences.useOldOrganization", false)) {
window.openAdvancedPreferences("dataChoicesTab", {origin: "dataReporting"});
window.openAdvancedPreferences("dataChoicesTab");
} else {
window.openPreferences("privacy-reports", {origin: "dataReporting"});
window.openPreferences("privacy-reports");
}
},
}];

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

@ -167,7 +167,7 @@ var gEMEHandler = {
let mainAction = {
label: gNavigatorBundle.getString(btnLabelId),
accessKey: gNavigatorBundle.getString(btnAccessKeyId),
callback() { openPreferences("panePrivacy", {origin: "browserMedia"}); },
callback() { openPreferences("panePrivacy"); },
dismiss: true
};
let options = {

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

@ -185,7 +185,7 @@
<menuitem id="menu_preferences"
label="&preferencesCmdUnix.label;"
accesskey="&preferencesCmdUnix.accesskey;"
oncommand="openPreferences(undefined, {origin: 'menubar'});"/>
oncommand="openPreferences();"/>
#endif
#endif
</menupopup>
@ -532,7 +532,7 @@
<menuitem id="menu_preferences"
label="&preferencesCmd2.label;"
accesskey="&preferencesCmd2.accesskey;"
oncommand="openPreferences(undefined, {origin: 'menubar'});"/>
oncommand="openPreferences();"/>
#endif
</menupopup>
</menu>

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

@ -93,7 +93,7 @@
<command id="Browser:OpenLocation" oncommand="openLocation();"/>
<command id="Browser:RestoreLastSession" oncommand="restoreLastSession();" disabled="true"/>
<command id="Browser:NewUserContextTab" oncommand="openNewUserContextTab(event.sourceEvent);"/>
<command id="Browser:OpenAboutContainers" oncommand="openPreferences('paneContainers', {origin: 'ContainersCommand'});"/>
<command id="Browser:OpenAboutContainers" oncommand="openPreferences('paneContainers');"/>
<command id="Tools:Search" oncommand="BrowserSearch.webSearch();"/>
<command id="Tools:Downloads" oncommand="BrowserDownloadsUI();"/>

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

@ -241,17 +241,17 @@ var gSync = {
onMenuPanelCommand() {
switch (this.panelUIFooter.getAttribute("fxastatus")) {
case "signedin":
this.openPrefs("menupanel", "fxaSignedin");
this.openPrefs("menupanel");
break;
case "error":
if (this.panelUIFooter.getAttribute("fxastatus") == "unverified") {
this.openPrefs("menupanel", "fxaError");
this.openPrefs("menupanel");
} else {
this.openSignInAgainPage("menupanel");
}
break;
default:
this.openPrefs("menupanel", "fxa");
this.openPrefs("menupanel");
break;
}
@ -439,8 +439,8 @@ var gSync = {
Services.obs.notifyObservers(null, "cloudsync:user-sync");
},
openPrefs(entryPoint = "syncbutton", origin = undefined) {
window.openPreferences("paneSync", { origin, urlParams: { entrypoint: entryPoint } });
openPrefs(entryPoint = "syncbutton") {
window.openPreferences("paneSync", { urlParams: { entrypoint: entryPoint } });
},
openSyncedTabsPanel() {

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

@ -527,9 +527,9 @@ const gStoragePressureObserver = {
// be removed by bug 1349689.
let win = gBrowser.ownerGlobal;
if (Preferences.get("browser.preferences.useOldOrganization", false)) {
win.openAdvancedPreferences("networkTab", {origin: "storagePressure"});
win.openAdvancedPreferences("networkTab");
} else {
win.openPreferences("panePrivacy", {origin: "storagePressure"});
win.openPreferences("panePrivacy");
}
}
});
@ -6371,9 +6371,9 @@ var OfflineApps = {
// The advanced subpanes are only supported in the old organization, which will
// be removed by bug 1349689.
if (Preferences.get("browser.preferences.useOldOrganization", false)) {
openAdvancedPreferences("networkTab", {origin: "offlineApps"});
openAdvancedPreferences("networkTab");
} else {
openPreferences("panePrivacy", {origin: "offlineApps"});
openPreferences("panePrivacy");
}
},

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

@ -715,12 +715,6 @@ function openAboutDialog() {
}
function openPreferences(paneID, extraArgs) {
let histogram = Services.telemetry.getHistogramById("FX_PREFERENCES_OPENED_VIA");
if (extraArgs && extraArgs.origin) {
histogram.add(extraArgs.origin);
} else {
histogram.add("other");
}
function switchToAdvancedSubPane(doc) {
if (extraArgs && extraArgs["advancedTab"]) {
let advancedPaneTabs = doc.getElementById("advancedPrefs");
@ -786,8 +780,8 @@ function openPreferences(paneID, extraArgs) {
}
}
function openAdvancedPreferences(tabID, origin) {
openPreferences("paneAdvanced", { "advancedTab": tabID, origin });
function openAdvancedPreferences(tabID) {
openPreferences("paneAdvanced", { "advancedTab": tabID });
}
/**

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

@ -1153,7 +1153,7 @@ let preferencesButton = {
defaultArea: CustomizableUI.AREA_PANEL,
onCommand(aEvent) {
let win = aEvent.target.ownerGlobal;
win.openPreferences(undefined, {origin: "preferencesButton"});
win.openPreferences();
}
};
if (AppConstants.platform == "win") {

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

@ -72,7 +72,7 @@ SearchProvider.prototype = {
manageEngines(browser) {
const browserWin = browser.ownerGlobal;
browserWin.openPreferences("paneGeneral", { origin: "contentSearch" });
browserWin.openPreferences("paneGeneral");
},
asyncGetState: Task.async(function*() {

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

@ -215,12 +215,7 @@ function openWindow(parent, url, target, features, args, noExternalArgs) {
return Services.ww.openWindow(parent, url, target, features, argArray);
}
function openPreferences(extraArgs) {
if (extraArgs && extraArgs.origin) {
Services.telemetry.getHistogramById("FX_PREFERENCES_OPENED_VIA").add(extraArgs.origin);
} else {
Services.telemetry.getHistogramById("FX_PREFERENCES_OPENED_VIA").add("other");
}
function openPreferences() {
var args = Components.classes["@mozilla.org/array;1"]
.createInstance(Components.interfaces.nsIMutableArray);
@ -356,7 +351,7 @@ nsBrowserContentHandler.prototype = {
// Handle old preference dialog URLs.
if (chromeParam == "chrome://browser/content/pref/pref.xul" ||
chromeParam == "chrome://browser/content/preferences/preferences.xul") {
openPreferences({origin: "commandLineLegacy"});
openPreferences();
cmdLine.preventDefault = true;
} else try {
let resolvedURI = resolveURIInternal(cmdLine, chromeParam);
@ -381,7 +376,7 @@ nsBrowserContentHandler.prototype = {
}
}
if (cmdLine.handleFlag("preferences", false)) {
openPreferences({origin: "commandLineLegacy"});
openPreferences();
cmdLine.preventDefault = true;
}
if (cmdLine.handleFlag("silent", false))

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

@ -303,7 +303,7 @@ BrowserGlue.prototype = {
observe: function BG_observe(subject, topic, data) {
switch (topic) {
case "notifications-open-settings":
this._openPreferences("privacy", { origin: "notifOpenSettings" });
this._openPreferences("privacy");
break;
case "prefservice:after-app-defaults":
this._onAppDefaults();
@ -1661,7 +1661,7 @@ BrowserGlue.prototype = {
let clickCallback = (subject, topic, data) => {
if (topic != "alertclickcallback")
return;
this._openPreferences("sync", { origin: "doorhanger" });
this._openPreferences("sync");
}
AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
},
@ -2244,7 +2244,7 @@ BrowserGlue.prototype = {
let clickCallback = (subject, topic, data) => {
if (topic != "alertclickcallback")
return;
this._openPreferences("sync", { origin: "devDisconnectedAlert"});
this._openPreferences("sync");
}
AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
},

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

@ -1460,7 +1460,7 @@
<method name="showSettings">
<body><![CDATA[
BrowserUITelemetry.countSearchSettingsEvent(this.telemetryOrigin);
openPreferences("general-search", {origin: "contentSearch"});
openPreferences("general-search");
// If the preference tab was already selected, the panel doesn't
// close itself automatically.
this.popup.hidePopup();

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

@ -126,7 +126,7 @@
label="&translation.options.neverForSite.label;"
accesskey="&translation.options.neverForSite.accesskey;"/>
<xul:menuseparator/>
<xul:menuitem oncommand="openPreferences('paneGeneral', {origin:'translationInfobar'});"
<xul:menuitem oncommand="openPreferences('paneGeneral');"
label="&translation.options.preferences.label;"
accesskey="&translation.options.preferences.accesskey;"/>
<xul:menuitem class="subviewbutton panel-subview-footer"

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

@ -537,7 +537,7 @@ this.UITour = {
return false;
}
window.openPreferences(data.pane, { origin: "UITour" });
window.openPreferences(data.pane);
break;
}

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

@ -138,11 +138,11 @@ var AboutHome = {
break;
case "AboutHome:Sync":
window.openPreferences("paneSync", { urlParams: { entrypoint: "abouthome" }, origin: "aboutHome" });
window.openPreferences("paneSync", { urlParams: { entrypoint: "abouthome" } });
break;
case "AboutHome:Settings":
window.openPreferences(undefined, {origin: "aboutHome"} );
window.openPreferences();
break;
case "AboutHome:RequestUpdate":

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

@ -415,7 +415,7 @@ this.ContentSearch = {
_onMessageManageEngines(msg, data) {
let browserWin = msg.target.ownerGlobal;
browserWin.openPreferences("paneGeneral", {origin: "contentSearch"});
browserWin.openPreferences("paneGeneral");
},
_onMessageGetSuggestions: Task.async(function* (msg, data) {

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

@ -6391,15 +6391,6 @@
"releaseChannelCollection": "opt-out",
"description": "Count how often each preference category is opened."
},
"FX_PREFERENCES_OPENED_VIA": {
"bug_numbers": [1330315],
"alert_emails": ["jaws@mozilla.com"],
"expires_in_version": "59",
"kind": "categorical",
"labels": ["aboutHome", "aboutTelemetry", "browserMedia", "commandLine", "commandLineLegacy", "ContainersCommand", "contentSearch", "dataReporting", "doorhanger", "devDisconnectedAlert", "experimentsOpenPref", "fxa", "fxaSignedin", "fxaError", "offlineApps", "prefserviceDefaults", "preferencesButton", "paneSync", "storagePressure", "translationInfobar", "UITour", "menubar", "notifOpenSettings", "other"],
"releaseChannelCollection": "opt-out",
"description":"Count how the Preferences are opened."
},
"INPUT_EVENT_RESPONSE_MS": {
"record_in_processes": ["main", "content"],
"alert_emails": ["perf-telemetry-alerts@mozilla.com"],

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

@ -245,9 +245,9 @@ var Settings = {
// The advanced subpanes are only supported in the old organization, which will
// be removed by bug 1349689.
if (Preferences.get("browser.preferences.useOldOrganization", false)) {
mainWindow.openAdvancedPreferences("dataChoicesTab", {origin: "aboutTelemetry"});
mainWindow.openAdvancedPreferences("dataChoicesTab");
} else {
mainWindow.openPreferences("paneAdvanced", {origin: "aboutTelemetry"});
mainWindow.openPreferences("paneAdvanced");
}
}
});

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

@ -1553,9 +1553,9 @@ var gViewController = {
// The advanced subpanes are only supported in the old organization, which will
// be removed by bug 1349689.
if (Preferences.get("browser.preferences.useOldOrganization", false)) {
mainWindow.openAdvancedPreferences("dataChoicesTab", {origin: "experimentsOpenPref"});
mainWindow.openAdvancedPreferences("dataChoicesTab");
} else {
mainWindow.openPreferences("paneAdvanced", {origin: "experimentsOpenPref"});
mainWindow.openPreferences("paneAdvanced");
}
},
},