On Wed, Dec 10, 2008 at 1:34 PM, Aaron Boodman <[EMAIL PROTECTED]> wrote:
> On Wed, Dec 10, 2008 at 12:09 PM, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
>>
>> Ojan brought this up before, but I think it's a good idea, so I'll
>> evangelize it some more.  Instead of requiring the extension developer
>> to come up with an extension ID (com.google.myextension), use
>> templating to automatically substitute a guaranteed unique ID where
>> needed.  The template substitution would be done in the browser
>> process before we handed the script off to a renderer. Examples:
>> -  img.src = "${EXTENSION_URL}/foo.gif";
>> -  var extension = new chromium.Extension("${EXTENSION_ID}");
>
> It is a good idea. Part of the reason I brought back the short ID was
> we found two places it was useful (here, and as a name for
> directories) and I was worried we were going to keep coming up with
> examples like that. Also, it seems like using a public key as an ID is
> overkill in case we ever have SSL-served extensions.
>
> On the other hand, there is a lot of charm to only having the public
> key as an identifier in the case of packaged extensions. And I'm not
> that concerned about the escaping issues.
>
> Let me think on it some more. Erikkay -- any thoughts on this?

In general, my preference would be to have a single id for the
extension.  Multiple id's seem to always end in pain and hurting.  We
already have one id that we know we have to have - the public key.
This is what we're going to use for autoupdate and blacklisting.
However, the public key is far too unwieldy for general use in
referring to the extension in code and on the filesystem.  Even with
templating, it would wind up expanding the underlying URL to something
that would likely break some assertions.  Given this, I think we need
a second id.  The reason we went with the com.example.myextension
style id is that it's more in keeping with the purpose of this id
which is to be the simple, user-friendly, human readable version.  Why
introduce yet another wacky unreadable guid-based id when we don't
have to? I don't think it's too much trouble to ask the developer to
come up with an id that's unique in this scheme.

Unfortunately, I also think we couldn't do templating even if we
wanted to.  What if you want to have multiple extensions that
cooperate with each other?  They need a way to refer to each other.

Erik

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/chromium-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to