mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-21 15:57:31 +09:00
Issue #1124: Remove Firefox Developer Edition code.
Removes all occurrences of MOZ_DEV_EDITION code and some helpers.
This commit is contained in:
parent
b7c0f39806
commit
1f68992bee
12 changed files with 5 additions and 223 deletions
|
|
@ -1054,10 +1054,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.
|
||||
|
|
@ -1193,40 +1189,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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue