From 76e687a97278dcae22006fdff3aae2cf9a7366b7 Mon Sep 17 00:00:00 2001 From: Dave Townsend Date: Fri, 5 Oct 2012 19:03:10 -0700 Subject: [PATCH] Backing out bug 720997 and bug 798160 due to bad l10n. --- toolkit/content/Troubleshoot.jsm | 53 ++++--------------- toolkit/content/aboutSupport.js | 22 -------- toolkit/content/aboutSupport.xhtml | 23 -------- .../tests/browser/browser_Troubleshoot.js | 4 -- .../en-US/chrome/global/aboutSupport.dtd | 4 -- 5 files changed, 10 insertions(+), 96 deletions(-) diff --git a/toolkit/content/Troubleshoot.jsm b/toolkit/content/Troubleshoot.jsm index 667482f957f..8ac5bbb3b6f 100644 --- a/toolkit/content/Troubleshoot.jsm +++ b/toolkit/content/Troubleshoot.jsm @@ -156,6 +156,16 @@ let dataProviders = { }, modifiedPreferences: function modifiedPreferences(done) { + function getPref(name) { + let table = {}; + table[Ci.nsIPrefBranch.PREF_STRING] = "getCharPref"; + table[Ci.nsIPrefBranch.PREF_INT] = "getIntPref"; + table[Ci.nsIPrefBranch.PREF_BOOL] = "getBoolPref"; + let type = Services.prefs.getPrefType(name); + if (!(type in table)) + throw new Error("Unknown preference type " + type + " for " + name); + return Services.prefs[table[type]](name); + } done(PREFS_WHITELIST.reduce(function (prefs, branch) { Services.prefs.getChildList(branch).forEach(function (name) { if (Services.prefs.prefHasUserValue(name) && @@ -356,47 +366,4 @@ let dataProviders = { } done(data); }, - - syncService: function syncService(done) { - let data = {}; - data.prefs = {}; - let main = {}; - Cu.import("resource://services-sync/main.js", main); - if (main.Weave.Status.checkSetup() != main.Weave.CLIENT_NOT_CONFIGURED) { - data.isEnabled = true; - let syncWhiteList = [ - "services.sync.clusterURL", - "services.sync.jpake.serverURL", - /^services\.sync\.engine\.[^.]+$/, - /^services\.sync\.[^.]+\.(lastSync|lastSyncLocal)$/, - ]; - let allprefs = Services.prefs.getChildList("services.sync"); - for (let entry of syncWhiteList) { - if (entry instanceof RegExp) { - for (let pref of allprefs) { - if (entry.test(pref)) - data.prefs[pref] = getPref(pref); - } - } - else { - data.prefs[entry] = getPref(entry); - } - } - } - else { - data.isEnabled = false; - } - done(data); - }, }; - -function getPref(name) { - let table = {}; - table[Ci.nsIPrefBranch.PREF_STRING] = "getCharPref"; - table[Ci.nsIPrefBranch.PREF_INT] = "getIntPref"; - table[Ci.nsIPrefBranch.PREF_BOOL] = "getBoolPref"; - let type = Services.prefs.getPrefType(name); - if (!(type in table)) - throw new Error("Unknown preference type " + type + " for " + name); - return Services.prefs[table[type]](name); -} diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js index 36b3099f534..f6545f90725 100644 --- a/toolkit/content/aboutSupport.js +++ b/toolkit/content/aboutSupport.js @@ -178,28 +178,6 @@ let snapshotFormatters = { ); $.append($("libversions-tbody"), trs); }, - - syncService: function syncService(data) { - if (data.isEnabled) { - let contents = document.getElementById("contents"); - let disabledTable = document.getElementById("sync-disabled-table"); - contents.removeChild(disabledTable); - - let trs = []; - for (let [name, val] of sortedArrayFromObject(data.prefs)) { - trs.push($.new("tr", [ - $.new("td", name), - $.new("td", val), - ])); - } - $.append($("sync-tbody"), trs); - } - else { - let contents = document.getElementById("contents"); - let enabledTable = document.getElementById("sync-enabled-table"); - contents.removeChild(enabledTable); - } - } }; let $ = document.getElementById.bind(document); diff --git a/toolkit/content/aboutSupport.xhtml b/toolkit/content/aboutSupport.xhtml index cbeb618a94c..299f51cf0a4 100644 --- a/toolkit/content/aboutSupport.xhtml +++ b/toolkit/content/aboutSupport.xhtml @@ -8,7 +8,6 @@ %htmlDTD; %globalDTD; %brandDTD; - %syncBrandDTD; %aboutSupportDTD; %resetProfileDTD; ]> @@ -244,28 +243,6 @@ - -

- &syncBrand.fullName.label; -

- - - - - - - -
- &aboutSupport.syncPrefsName; - - &aboutSupport.syncPrefsValue; -
- - -
- &aboutSupport.syncNotSupported; -
-

&aboutSupport.a11yTitle; diff --git a/toolkit/content/tests/browser/browser_Troubleshoot.js b/toolkit/content/tests/browser/browser_Troubleshoot.js index 1dd0faae202..36487abe3b5 100644 --- a/toolkit/content/tests/browser/browser_Troubleshoot.js +++ b/toolkit/content/tests/browser/browser_Troubleshoot.js @@ -129,10 +129,6 @@ const SNAPSHOT_SCHEMA = { required: true, type: "object", }, - syncService: { - required: true, - type: "object", - }, graphics: { required: true, type: "object", diff --git a/toolkit/locales/en-US/chrome/global/aboutSupport.dtd b/toolkit/locales/en-US/chrome/global/aboutSupport.dtd index e65e191566a..837b20db41c 100644 --- a/toolkit/locales/en-US/chrome/global/aboutSupport.dtd +++ b/toolkit/locales/en-US/chrome/global/aboutSupport.dtd @@ -62,7 +62,3 @@ variant of aboutSupport.showDir.label. --> - - - -