Closed
Bug 311015
Opened 19 years ago
Closed 19 years ago
safe mode: add support for disabling all extensions
Categories
(Firefox :: General, defect, P2)
Tracking
()
VERIFIED
FIXED
Firefox 2 beta1
People
(Reporter: mconnor, Assigned: Gavin)
References
(Blocks 1 open bug)
Details
(Keywords: fixed1.8.1)
Attachments
(1 file, 1 obsolete file)
4.74 KB,
patch
|
robert.strong.bugs
:
review+
mconnor
:
superreview+
mconnor
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
Spun off so I can resolve bug 304403.
Need a new EM method to disable all addons of all types, excepting app disabled
and app managed addons.
Unhide checkbox, and make it trigger this method.
Not going to happen for 1.5
Comment 1•19 years ago
|
||
Since it won't be supported for 1.5 we should hide this option during the first
safe-mode startup for 1.8. Further showings of that window don't include it.
Reporter | ||
Comment 2•19 years ago
|
||
are you sure that its ever visible? its hidden="true" so I don't see how its
showing up at all.
Comment 3•19 years ago
|
||
(In reply to comment #2)
> are you sure that its ever visible? its hidden="true" so I don't see how its
> showing up at all.
Yes, I saw that checkbox with my development profile which is still a bit older.
After a second restart it is not visible anymore. Also fresh profiles don't show
that checkbox. It seems that it was a conflict with older data in my profile. So
don't worry about.
Reporter | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Flags: blocking-firefox2+
Target Milestone: --- → Firefox 2 beta1
Reporter | ||
Updated•19 years ago
|
Priority: -- → P2
Comment 4•19 years ago
|
||
Code to disable all extensions, locales, and plugins:
const nsIUpdateItem = Components.interfaces.nsIUpdateItem;
var em = Components.classes["@mozilla.org/extensions/manager;1"]
.getService(Components.interfaces.nsIExtensionManager);
var type = nsIUpdateItem.TYPE_EXTENSION + nsIUpdateItem.TYPE_LOCALE + nsIUpdateItem.TYPE_PLUGIN;
var items = em.getItemList(type, { });
for (var i = 0; i < items.length; ++i)
em.disableItem(items[i].id);
Comment 5•19 years ago
|
||
btw: when I stated extensions, locales, and plugins I am referring to Extension Manager managed items of these types.
Reporter | ||
Updated•19 years ago
|
Assignee: mconnor → gavin.sharp
Status: ASSIGNED → NEW
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
OS: Windows XP → All
Hardware: PC → All
Version: Trunk → 2.0 Branch
Comment 6•19 years ago
|
||
The concerns regarding Extension Manager managed locales and plugins are resolved now on the trunk and should be resolved on the branch before this would be ready for checkin.
Assignee | ||
Comment 7•19 years ago
|
||
I'm not sure that this does the right thing with locale packs and plugins, but this seems to work for extensions and the theme.
Attachment #223581 -
Flags: superreview?(mconnor)
Attachment #223581 -
Flags: review?(robert.bugzilla)
Assignee | ||
Updated•19 years ago
|
Whiteboard: [patch-r?]
Comment 8•19 years ago
|
||
Comment on attachment 223581 [details] [diff] [review]
patch
>Index: browser/base/content/safeMode.js
>===================================================================
>+ // Select the default theme
>+ const themePref = "general.skins.selectedSkin";
>+ var prefB = Components.classes["@mozilla.org/preferences-service;1"]
>+ .getService(Components.interfaces.nsIPrefBranch);
>+ prefB.setCharPref(themePref, "classic/1.0");
>+}
Should use clearUserPref here.
Assignee | ||
Comment 9•19 years ago
|
||
(In reply to comment #8)
> Should use clearUserPref here.
Indeed, thanks!
Attachment #223581 -
Attachment is obsolete: true
Attachment #223583 -
Flags: superreview?(mconnor)
Attachment #223583 -
Flags: review?(robert.bugzilla)
Attachment #223581 -
Flags: superreview?(mconnor)
Attachment #223581 -
Flags: review?(robert.bugzilla)
Comment 10•19 years ago
|
||
Comment on attachment 223583 [details] [diff] [review]
patch with Mano's suggestion
Looks fine and this does disable locales packs and plugins.
btw (not part of this bug): the ui for safe mode is a bit misleading. When you select the checkboxes for an operation and click continue in safe mode the operations are not performed.
Also, the try catch around the different operations performed seems to be a bit much. If any of these are prone to throwing it will prevent subsequent operations from being performed. Seems like either it should be removed or if some parts are prone to throwing then they should be addresses specifically.
Attachment #223583 -
Flags: review?(robert.bugzilla) → review+
Reporter | ||
Comment 11•19 years ago
|
||
Comment on attachment 223583 [details] [diff] [review]
patch with Mano's suggestion
hmm, that try/catch is pretty bloaty. Gavin, can you file a followup and break those into independent try/catch blocks?
Attachment #223583 -
Flags: superreview?(mconnor)
Attachment #223583 -
Flags: superreview+
Attachment #223583 -
Flags: approval-branch-1.8.1+
Assignee | ||
Updated•19 years ago
|
Whiteboard: [patch-r?] → [checkin needed (1.8 branch)]
Assignee | ||
Comment 12•19 years ago
|
||
mozilla/browser/locales/en-US/chrome/browser/safeMode.dtd 1.2
mozilla/browser/base/content/safeMode.js 1.6
mozilla/browser/base/content/safeMode.xul 1.5
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 13•19 years ago
|
||
mozilla/browser/locales/en-US/chrome/browser/safeMode.dtd 1.1.2.1
mozilla/browser/base/content/safeMode.xul 1.1.2.4
mozilla/browser/base/content/safeMode.js 1.1.2.4
Keywords: fixed1.8.1
Whiteboard: [checkin needed (1.8 branch)]
Updated•18 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•