On Wed, Jul 15, 2009 at 9:59 AM, Aaron Boodman <a...@chromium.org> wrote:

> a) I think it is important to not break the extension system with this
> mod, so that means that for awhile (1 or 2 dev channel releases?) we
> will both write the entire manifest to the prefs and load from disk
> normally.


What if on extension load, we checked the prefs first, and if the manifest
entry was absent, then we loaded from disk?  New extension installs would
write only to the pref.  Seems like that would get us transparent backwards
compat.


> b) Extension prefs are currently written in
> ExtensionsService::OnExtensionInstalled. At this point, we no longer
> have the JSON form of the manifest, it has already been parsed into an
> Extension object.


It's easy enough to pass along the JSON object from OnExtensionUnpacked,
which calls OnExtensionInstalled.

b) and c) lead me to the conclusion that we should refactor the
> Extension class so that it is a lightweight wrapper around a JSON
> dictionary and has no state of its own. This would fix the problem of
> not having access to the JSON representation and therefore having to
> write serialization code for it.


A less radical approach would be to keep a copy of the JSON dictionary in
the Extension class while we're in this migration period.  That's not to say
we shouldn't refactor the Extension class (I have no opinion on that).

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to