Closed
Bug 386533
Opened 18 years ago
Closed 17 years ago
Mechanism for registering alternative nsILoginManagerStorage implementations
Categories
(Toolkit :: Password Manager, defect)
Toolkit
Password Manager
Tracking
()
RESOLVED
FIXED
mozilla1.9beta4
People
(Reporter: sylvain.pasche, Assigned: sylvain.pasche)
References
Details
(Keywords: dev-doc-complete)
Attachments
(1 file, 3 obsolete files)
1.30 KB,
patch
|
Gavin
:
review+
beltzner
:
approval1.9+
|
Details | Diff | Splinter Review |
This patch uses a category for finding an alternative cid for the nsILoginManagerStorage component.
Attachment #270526 -
Flags: review?(dolske)
Comment 1•18 years ago
|
||
Please use "contractID" and not "cid", cid is the commonly used acronym for "class/component ID".
Assignee | ||
Comment 2•18 years ago
|
||
Thanks for your comment, I've renamed it.
Attachment #270526 -
Attachment is obsolete: true
Attachment #270609 -
Flags: review?(dolske)
Attachment #270526 -
Flags: review?(dolske)
Comment 3•18 years ago
|
||
While this works for having *one* alternative replace the default, what if there are multiple alternative storage modules?
Another flavor of this is that it would probably be a good idea to have all storage modules be detected through the same code path (including storage-Legacy.js). That makes it less likely that we'll accidently break something.
Assignee | ||
Comment 4•18 years ago
|
||
(In reply to comment #3)
> While this works for having *one* alternative replace the default, what if
> there are multiple alternative storage modules?
Actually, the alternative storage module that will be used is the last one to perform the addCategoryEntry() call before nsLoginManager initializes the storage module. This more or less assumes that user won't have several storage module providers.
> Another flavor of this is that it would probably be a good idea to have all
> storage modules be detected through the same code path (including
> storage-Legacy.js). That makes it less likely that we'll accidently break
> something.
That would be a good idea. For this to work using the current usage of the category manager, it means we need to add the default storage-Legacy category before any other components do. However, there may be timing issues for components doing it when they are registered (like I did for gnome-keyring), as I think we can't control that a given component is registered before all others.
Comment 5•17 years ago
|
||
Comment on attachment 270609 [details] [diff] [review]
v2
>Index: nsLoginManager.js
>===================================================================
>+ this.__storage = Cc[contractID]
>+ .createInstance(Ci.nsILoginManagerStorage);
Nit, make it:
+ this.__storage = Cc[contractID].
+ createInstance(Ci.nsILoginManagerStorage);
I'm ok with with this, although I would sort of prefer to not have this checked in until there's a finished Gnome / OS X nsILoginManagerStorage component ready to make use of it.
Attachment #270609 -
Flags: review?(gavin.sharp)
Attachment #270609 -
Flags: review?(dolske)
Attachment #270609 -
Flags: review+
Assignee | ||
Comment 6•17 years ago
|
||
I've unassigned me from bug 309807, so this is going to stay in stand-by mode until someone takes one of the dependent bug.
Attachment #270609 -
Attachment is obsolete: true
Attachment #282009 -
Flags: review?(gavin.sharp)
Attachment #270609 -
Flags: review?(gavin.sharp)
Comment 7•17 years ago
|
||
Taking to help push this in for Beta 4. We really ought to have a way to replace the storage module (even if imperfect), so that extensions for native Gnome/OSX storage are possible in FF3.
Assignee: nobody → dolske
Target Milestone: --- → Firefox 3 beta4
Assignee | ||
Comment 8•17 years ago
|
||
Attachment #282009 -
Attachment is obsolete: true
Attachment #304702 -
Flags: review?(gavin.sharp)
Attachment #282009 -
Flags: review?(gavin.sharp)
Updated•17 years ago
|
Attachment #304702 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Updated•17 years ago
|
Attachment #304702 -
Flags: approval1.9?
Comment 9•17 years ago
|
||
Comment on attachment 304702 [details] [diff] [review]
unbitrot
a=beltzner for 1.9
Attachment #304702 -
Flags: approval1.9? → approval1.9+
Updated•17 years ago
|
Assignee: dolske → sylvain.pasche
Keywords: checkin-needed
Comment 10•17 years ago
|
||
Yay!
Checking in toolkit/components/passwordmgr/src/nsLoginManager.js;
new revision: 1.27; previous revision: 1.26
Updated•17 years ago
|
Keywords: dev-doc-needed
Comment 11•17 years ago
|
||
Can anyone summarize how you use this? I've looked at it for a while and am not sure I could describe it adequately in docs.
Assignee | ||
Comment 12•17 years ago
|
||
Hi Eric, I can write some explanations and sample code and let you proofread it if you point me on devmo where it should go.
Comment 13•17 years ago
|
||
Let's try putting an article here:
http://developer.mozilla.org/en/docs/Creating_a_Login_Manager_storage_module
Once you get something put in there, I'll clean it up as needed. Thanks!
Assignee | ||
Comment 14•17 years ago
|
||
I've created that page. I think this should provide enough information for extension authors to get started. (nsILoginStorage page is not created but the .idl is well documented).
Updated•17 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
Comment 15•17 years ago
|
||
Where is nsILoginStorage? I can't find it searching mxr.
Assignee | ||
Comment 16•17 years ago
|
||
Sorry, that was nsILoginManagerStorage. I've fixed the page. Thanks for the cleanups.
Comment 17•17 years ago
|
||
(In reply to comment #14)
> (nsILoginManagerStorage page is not created but the .idl is well documented).
It's functionally equivalent to the interfaces in nsILoginManger (which is mostly just a wrapper), so any page for that should probably just note that and not repeat detail from nsILoginManager.
Comment 18•17 years ago
|
||
Oh, and thanks bunches for writing up the "Creating a Login Manager storage module" wiki page!
Updated•17 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•