Bug 867354 - Don't prompt for feedback in distribution builds. r=mfinkle

This commit is contained in:
Margaret Leibovic 2013-06-03 08:37:29 -07:00
Родитель 034f4c27fa
Коммит 97c84b18b0
4 изменённых файлов: 21 добавлений и 1 удалений

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

@ -1668,7 +1668,7 @@ abstract public class BrowserApp extends GeckoApp
@Override
public void onPostExecute(Boolean shouldShowFeedbackPage) {
if (shouldShowFeedbackPage)
Tabs.getInstance().loadUrlInTab("about:feedback");
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Feedback:Show", null));
}
}).execute();
}

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

@ -0,0 +1,18 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var Feedback = {
observe: function(aMessage, aTopic, aData) {
if (aTopic !== "Feedback:Show")
return;
// Only prompt for feedback if this isn't a distribution build.
try {
Services.prefs.getCharPref("distribution.id");
} catch (e) {
BrowserApp.addTab("about:feedback", { selected: true, parentId: BrowserApp.selectedTab.id });
}
}
};

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

@ -107,6 +107,7 @@ var LazyNotificationGetter = {
["FindHelper", ["FindInPage:Find", "FindInPage:Prev", "FindInPage:Next", "FindInPage:Closed", "Tab:Selected"], "chrome://browser/content/FindHelper.js"],
["PermissionsHelper", ["Permissions:Get", "Permissions:Clear"], "chrome://browser/content/PermissionsHelper.js"],
["FeedHandler", ["Feeds:Subscribe"], "chrome://browser/content/FeedHandler.js"],
["Feedback", ["Feedback:Show"], "chrome://browser/content/Feedback.js"],
].forEach(function (aScript) {
let [name, notifications, script] = aScript;
XPCOMUtils.defineLazyGetter(window, name, function() {

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

@ -49,6 +49,7 @@ chrome.jar:
content/FindHelper.js (content/FindHelper.js)
content/PermissionsHelper.js (content/PermissionsHelper.js)
content/FeedHandler.js (content/FeedHandler.js)
content/Feedback.js (content/Feedback.js)
#ifdef MOZ_SERVICES_HEALTHREPORT
content/aboutHealthReport.xhtml (content/aboutHealthReport.xhtml)
* content/aboutHealthReport.js (content/aboutHealthReport.js)