summaryrefslogtreecommitdiffstats
path: root/toolkit
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-05-12 14:32:03 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-05-12 14:32:03 +0200
commitb7d9dad58e5a3f87a6c767412941700bc8010044 (patch)
treef5e99b3029cf54409ae5951e9e91cca3a54addc7 /toolkit
parent73cdd6117df7c17b76aad93952cf574c494351aa (diff)
downloadUXP-b7d9dad58e5a3f87a6c767412941700bc8010044.tar
UXP-b7d9dad58e5a3f87a6c767412941700bc8010044.tar.gz
UXP-b7d9dad58e5a3f87a6c767412941700bc8010044.tar.lz
UXP-b7d9dad58e5a3f87a6c767412941700bc8010044.tar.xz
UXP-b7d9dad58e5a3f87a6c767412941700bc8010044.zip
Remove MOZ_B2G leftovers and some dead B2G-only components.
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/components/jsdownloads/src/DownloadIntegration.jsm7
-rw-r--r--toolkit/components/jsdownloads/src/DownloadUIHelper.jsm7
-rw-r--r--toolkit/identity/FirefoxAccounts.jsm9
-rw-r--r--toolkit/modules/AppConstants.jsm17
-rw-r--r--toolkit/mozapps/webextensions/nsBlocklistService.js11
-rw-r--r--toolkit/xre/nsXREDirProvider.cpp36
-rw-r--r--toolkit/xre/nsXREDirProvider.h5
7 files changed, 4 insertions, 88 deletions
diff --git a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm
index 7439d9d11..4069bca74 100644
--- a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm
@@ -300,12 +300,7 @@ this.DownloadIntegration = {
aDownload.hasBlockedData) {
return true;
}
-#ifdef MOZ_B2G
- // On B2G we keep a few days of history.
- let maxTime = Date.now() -
- Services.prefs.getIntPref("dom.downloads.max_retention_days") * 24 * 60 * 60 * 1000;
- return aDownload.startTime > maxTime;
-#elif defined(MOZ_WIDGET_ANDROID)
+#if defined(MOZ_WIDGET_ANDROID)
// On Android we store all history.
return true;
#else
diff --git a/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm b/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
index f5102b4a8..5bd351ee9 100644
--- a/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
@@ -106,12 +106,7 @@ XPCOMUtils.defineLazyGetter(DownloadUIHelper, "strings", function () {
*/
this.DownloadPrompter = function (aParent)
{
- if (AppConstants.MOZ_B2G) {
- // On B2G there is no prompter implementation.
- this._prompter = null;
- } else {
- this._prompter = Services.ww.getNewPrompter(aParent);
- }
+ this._prompter = Services.ww.getNewPrompter(aParent);
}
this.DownloadPrompter.prototype = {
diff --git a/toolkit/identity/FirefoxAccounts.jsm b/toolkit/identity/FirefoxAccounts.jsm
index 54efaf3b4..1d2ed0439 100644
--- a/toolkit/identity/FirefoxAccounts.jsm
+++ b/toolkit/identity/FirefoxAccounts.jsm
@@ -35,18 +35,11 @@ var log = Log.repository.getLogger("Identity.FxAccounts");
log.level = LOG_LEVEL;
log.addAppender(new Log.ConsoleAppender(new Log.BasicFormatter()));
-#ifdef MOZ_B2G
-XPCOMUtils.defineLazyModuleGetter(this, "FxAccountsManager",
- "resource://gre/modules/FxAccountsManager.jsm",
- "FxAccountsManager");
-Cu.import("resource://gre/modules/FxAccountsCommon.js");
-#else
-log.warn("The FxAccountsManager is only functional in B2G at this time.");
+log.warn("The FxAccountsManager has been removed.");
var FxAccountsManager = null;
var ONVERIFIED_NOTIFICATION = null;
var ONLOGIN_NOTIFICATION = null;
var ONLOGOUT_NOTIFICATION = null;
-#endif
function FxAccountsService() {
Services.obs.addObserver(this, "quit-application-granted", false);
diff --git a/toolkit/modules/AppConstants.jsm b/toolkit/modules/AppConstants.jsm
index b4201ec67..c500b21e8 100644
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -130,14 +130,6 @@ this.AppConstants = Object.freeze({
false,
#endif
-# MOZ_B2G covers both device and desktop b2g
- MOZ_B2G:
-#ifdef MOZ_B2G
- true,
-#else
- false,
-#endif
-
XP_UNIX:
#ifdef XP_UNIX
true,
@@ -204,13 +196,6 @@ this.AppConstants = Object.freeze({
false,
#endif
- MOZ_B2G_RIL:
-#ifdef MOZ_B2G_RIL
- true,
-#else
- false,
-#endif
-
MOZ_GRAPHENE:
#ifdef MOZ_GRAPHENE
true,
@@ -300,8 +285,6 @@ this.AppConstants = Object.freeze({
INSTALL_LOCALE: "@AB_CD@",
MOZ_WIDGET_TOOLKIT: "@MOZ_WIDGET_TOOLKIT@",
ANDROID_PACKAGE_NAME: "@ANDROID_PACKAGE_NAME@",
- MOZ_B2G_VERSION: @MOZ_B2G_VERSION@,
- MOZ_B2G_OS_NAME: @MOZ_B2G_OS_NAME@,
DEBUG_JS_MODULES: "@DEBUG_JS_MODULES@",
diff --git a/toolkit/mozapps/webextensions/nsBlocklistService.js b/toolkit/mozapps/webextensions/nsBlocklistService.js
index 0af90430c..268c197fc 100644
--- a/toolkit/mozapps/webextensions/nsBlocklistService.js
+++ b/toolkit/mozapps/webextensions/nsBlocklistService.js
@@ -907,10 +907,6 @@ Blocklist.prototype = {
this._handleEmItemNode);
break;
case "pluginItems":
- // We don't support plugins on b2g.
- if (AppConstants.MOZ_B2G) {
- return;
- }
this._pluginEntries = this._processItemNodes(element.childNodes, "pluginItem",
this._handlePluginItemNode);
break;
@@ -1151,8 +1147,7 @@ Blocklist.prototype = {
/* See nsIBlocklistService */
getPluginBlocklistState: function(plugin, appVersion, toolkitVersion) {
- if (AppConstants.platform == "android" ||
- AppConstants.MOZ_B2G) {
+ if (AppConstants.platform == "android") {
return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
}
if (!this._isBlocklistLoaded())
@@ -1314,10 +1309,6 @@ Blocklist.prototype = {
},
_blocklistUpdated: function(oldAddonEntries, oldPluginEntries) {
- if (AppConstants.MOZ_B2G) {
- return;
- }
-
var addonList = [];
// A helper function that reverts the prefs passed to default values.
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
index 04e2e1ebf..f2d0b1b0f 100644
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -126,10 +126,6 @@ nsXREDirProvider::Initialize(nsIFile *aXULAppDir,
}
}
-#ifdef MOZ_B2G
- LoadAppBundleDirs();
-#endif
-
return NS_OK;
}
@@ -761,38 +757,6 @@ nsXREDirProvider::LoadExtensionBundleDirectories()
}
}
-#ifdef MOZ_B2G
-void
-nsXREDirProvider::LoadAppBundleDirs()
-{
- nsCOMPtr<nsIFile> dir;
- bool persistent = false;
- nsresult rv = GetFile(XRE_APP_DISTRIBUTION_DIR, &persistent, getter_AddRefs(dir));
- if (NS_FAILED(rv))
- return;
-
- dir->AppendNative(NS_LITERAL_CSTRING("bundles"));
-
- nsCOMPtr<nsISimpleEnumerator> e;
- rv = dir->GetDirectoryEntries(getter_AddRefs(e));
- if (NS_FAILED(rv))
- return;
-
- nsCOMPtr<nsIDirectoryEnumerator> files = do_QueryInterface(e);
- if (!files)
- return;
-
- nsCOMPtr<nsIFile> subdir;
- while (NS_SUCCEEDED(files->GetNextFile(getter_AddRefs(subdir))) && subdir) {
- mAppBundleDirectories.AppendObject(subdir);
-
- nsCOMPtr<nsIFile> manifest =
- CloneAndAppend(subdir, "chrome.manifest");
- XRE_AddManifestLocation(NS_APP_LOCATION, manifest);
- }
-}
-#endif
-
static const char *const kAppendPrefDir[] = { "defaults", "preferences", nullptr };
#ifdef DEBUG_bsmedberg
diff --git a/toolkit/xre/nsXREDirProvider.h b/toolkit/xre/nsXREDirProvider.h
index 1190cc708..655f664e6 100644
--- a/toolkit/xre/nsXREDirProvider.h
+++ b/toolkit/xre/nsXREDirProvider.h
@@ -124,11 +124,6 @@ protected:
// Calculate and register extension and theme bundle directories.
void LoadExtensionBundleDirectories();
-#ifdef MOZ_B2G
- // Calculate and register app-bundled extension directories.
- void LoadAppBundleDirs();
-#endif
-
void Append(nsIFile* aDirectory);
nsCOMPtr<nsIDirectoryServiceProvider> mAppProvider;