summaryrefslogtreecommitdiffstats
path: root/application/basilisk/components/nsBrowserGlue.js
diff options
context:
space:
mode:
Diffstat (limited to 'application/basilisk/components/nsBrowserGlue.js')
-rw-r--r--application/basilisk/components/nsBrowserGlue.js63
1 files changed, 3 insertions, 60 deletions
diff --git a/application/basilisk/components/nsBrowserGlue.js b/application/basilisk/components/nsBrowserGlue.js
index d29009b13..5d3e4689b 100644
--- a/application/basilisk/components/nsBrowserGlue.js
+++ b/application/basilisk/components/nsBrowserGlue.js
@@ -676,19 +676,6 @@ BrowserGlue.prototype = {
// Ensure we keep track of places/pw-mananager undo by init'ing this early.
Cu.import("resource:///modules/AutoMigrate.jsm");
- if (!AppConstants.RELEASE_OR_BETA) {
- let themeName = gBrowserBundle.GetStringFromName("deveditionTheme.name");
- let vendorShortName = gBrandBundle.GetStringFromName("vendorShortName");
-
- LightweightThemeManager.addBuiltInTheme({
- id: "firefox-devedition@mozilla.org",
- name: themeName,
- headerURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.header.png",
- iconURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.icon.png",
- author: vendorShortName,
- });
- }
-
TabCrashHandler.init();
Services.obs.notifyObservers(null, "browser-ui-startup-complete", "");
@@ -1054,10 +1041,6 @@ BrowserGlue.prototype = {
// All initial windows have opened.
_onWindowsRestored: function BG__onWindowsRestored() {
- if (AppConstants.MOZ_DEV_EDITION) {
- this._createExtraDefaultProfile();
- }
-
this._initServiceDiscovery();
// Show update notification, if needed.
@@ -1074,7 +1057,7 @@ BrowserGlue.prototype = {
// them to the user.
let changedIDs = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_INSTALLED);
if (changedIDs.length > 0) {
- let win = this.getMostRecentBrowserWindow();
+ let win = RecentWindow.getMostRecentBrowserWindow();
AddonManager.getAddonsByIDs(changedIDs, function(aAddons) {
aAddons.forEach(function(aAddon) {
// If the add-on isn't user disabled or can't be enabled then skip it.
@@ -1193,40 +1176,6 @@ BrowserGlue.prototype = {
E10SAccessibilityCheck.onWindowsRestored();
},
- _createExtraDefaultProfile: function () {
- if (!AppConstants.MOZ_DEV_EDITION) {
- return;
- }
- // If Developer Edition is the only installed Firefox version and no other
- // profiles are present, create a second one for use by other versions.
- // This helps Firefox versions earlier than 35 avoid accidentally using the
- // unsuitable Developer Edition profile.
- let profileService = Cc["@mozilla.org/toolkit/profile-service;1"]
- .getService(Ci.nsIToolkitProfileService);
- let profileCount = profileService.profileCount;
- if (profileCount == 1 && profileService.selectedProfile.name != "default") {
- let newProfile;
- try {
- newProfile = profileService.createProfile(null, "default");
- profileService.defaultProfile = newProfile;
- profileService.flush();
- } catch (e) {
- Cu.reportError("Could not create profile 'default': " + e);
- }
- if (newProfile) {
- // We don't want a default profile with Developer Edition settings, an
- // empty profile directory will do. The profile service of the other
- // Firefox will populate it with its own stuff.
- let newProfilePath = newProfile.rootDir.path;
- OS.File.removeDir(newProfilePath).then(() => {
- return OS.File.makeDir(newProfilePath);
- }).then(null, e => {
- Cu.reportError("Could not empty profile 'default': " + e);
- });
- }
- }
- },
-
_onQuitRequest: function BG__onQuitRequest(aCancelQuit, aQuitType) {
// If user has already dismissed quit request, then do nothing
if ((aCancelQuit instanceof Ci.nsISupportsPRBool) && aCancelQuit.data)
@@ -1981,14 +1930,8 @@ BrowserGlue.prototype = {
defaultThemeSelected = Services.prefs.getCharPref("general.skins.selectedSkin") == "classic/1.0";
} catch (e) {}
- // If we are on the devedition channel, the devedition theme is on by
- // default. But we need to handle the case where they didn't want it
- // applied, and unapply the theme.
- let userChoseToNotUseDeveditionTheme =
- !defaultThemeSelected ||
- (lightweightThemeSelected && selectedThemeID != "firefox-devedition@mozilla.org");
-
- if (userChoseToNotUseDeveditionTheme && selectedThemeID == "firefox-devedition@mozilla.org") {
+ // If we have the dev edition theme selected, reset it.
+ if (selectedThemeID == "firefox-devedition@mozilla.org") {
Services.prefs.setCharPref("lightweightThemes.selectedThemeID", "");
}