Hey all,
I've put together a proposal for a content settings extension API at
the purpose of this API is to expose Chromium's content setting
sub-system to extension, so they can implement different usage models
than what we've implemented in Chromium.
Please comment!
thanks
-jochen
- a
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
>
Nico
On Tue, Nov 30, 2010 at 11:07 AM, Jochen Eisinger <joc...@chromium.org> wrote:
We could introduce a maximal number of content setting rules that can
exist at any time (similar to cookies). Otoh, why would an extension
do this instead of encoding the data in a single history entry?
Heh.
> We could introduce a maximal number of content setting rules that can
> exist at any time (similar to cookies). Otoh, why would an extension
> do this instead of encoding the data in a single history entry?
Putting some kind of very large hard limit on the number of items
seems like a good thing to do.
But there should be little reason to resort to this. We provide proper
storage options to extension developers and there is no penalty (in
terms of scary UI) for using it to store whatever you want:
http://code.google.com/chrome/extensions/manifest.html#permissions
(see 'unlimitedStorage').
(we don't display any warning UI for requesting this permission)
- a
I wasn't able to comment on the doc, so here we go:
- Nit: We use permissions like 'contentSettings' instead of 'content_settings'
- I assume this is going to use the system you've been working on that
makes the setting for a given preference deterministic when multiple
extensions are involved? If so, will there be UI somewhere that tells
users that an extension (or which extension?) is managing a given
setting?
- Why not use match patterns
(http://code.google.com/chrome/extensions/match_patterns.html) for the
patterns? It seems to cover all the use cases you have in mind, and
developers will already be familiar with it.
- I prefer separate getters/setters for the misc settings.
- For some reason, I *don't* prefer separate modules for the non-misc
settings. I realize this is inconsistent with the above. Maybe it is
because it feels more egregious to dump a bunch of booleans into a
settings object than a bunch of more complex rules. Sorry :-/.
- a
This is exciting!
I wasn't able to comment on the doc, so here we go:
- Nit: We use permissions like 'contentSettings' instead of 'content_settings'
- I assume this is going to use the system you've been working on that
makes the setting for a given preference deterministic when multiple
extensions are involved? If so, will there be UI somewhere that tells
users that an extension (or which extension?) is managing a given
setting?
- Why not use match patterns
(http://code.google.com/chrome/extensions/match_patterns.html) for the
patterns? It seems to cover all the use cases you have in mind, and
developers will already be familiar with it.
There's also the same reason we didn't use match patterns for the
regular content settings UI, which is that it's not clear which rule
would take precedence in case of conflicts.
> An alternative would be to use match patterns and e.g. gray out the content
> exception editor in our UI with a note saying that you're using extensions
> to control these settings. In that case, using match patterns would be a
> perfectly reasonable thing to do.
So, wou want to disable *all* exception editing as soon as you install
one extension which sets exceptions? Wouldn't that greatly reduce the
value of content settings in general?
Bernhard.
On Wed, Dec 15, 2010 at 12:14, Jochen Eisinger <joc...@chromium.org> wrote:There's also the same reason we didn't use match patterns for the
>
>
> On Sun, Dec 12, 2010 at 10:55 AM, Aaron Boodman <a...@chromium.org> wrote:
>>
>> This is exciting!
>>
>> I wasn't able to comment on the doc, so here we go:
>>
>> - Nit: We use permissions like 'contentSettings' instead of
>> 'content_settings'
>>
>> - I assume this is going to use the system you've been working on that
>> makes the setting for a given preference deterministic when multiple
>> extensions are involved? If so, will there be UI somewhere that tells
>> users that an extension (or which extension?) is managing a given
>> setting?
>>
>> - Why not use match patterns
>> (http://code.google.com/chrome/extensions/match_patterns.html) for the
>> patterns? It seems to cover all the use cases you have in mind, and
>> developers will already be familiar with it.
>
> I want to comment on these two points: The reason for not using match
> patterns is that the rules created in this API could be directly displayed
> and managed in our existing UI.
regular content settings UI, which is that it's not clear which rule
would take precedence in case of conflicts.
So, wou want to disable *all* exception editing as soon as you install
> An alternative would be to use match patterns and e.g. gray out the content
> exception editor in our UI with a note saying that you're using extensions
> to control these settings. In that case, using match patterns would be a
> perfectly reasonable thing to do.
one extension which sets exceptions? Wouldn't that greatly reduce the
value of content settings in general?
Oh, I didn't realize you were intending to have extension-supplied
settings editable. It seems like this would create some complexity. I
think UX wise I would personally prefer just saying "extension xyz is
controlling. [ ] go back to manual control".
- a
Why don't we upgrade user-defined exceptions to match patterns then?
>
>>
>> > An alternative would be to use match patterns and e.g. gray out the
>> > content
>> > exception editor in our UI with a note saying that you're using
>> > extensions
>> > to control these settings. In that case, using match patterns would be a
>> > perfectly reasonable thing to do.
>>
>> So, wou want to disable *all* exception editing as soon as you install
>> one extension which sets exceptions? Wouldn't that greatly reduce the
>> value of content settings in general?
>
> An alternative would be to display the match patterns but have them
> not-editable?
I would prefer that, yes. If we're going to have policy-controlled
exceptions at some point, we could just as well get exceptions from
the ExtensionPrefStore (or whatever it's called these days ;-) ), and
treat them the same way.
As long as that only refers to the exceptions added by an extension.
It would suck not to be able to add exceptions for youtube.com, just
because an extension is managing your content settings for google.com,
for example.
Bernhard.
>
> - a
There is no reason not to be able to edit match patterns, it's just
exceptions set by an extension that should be read-only (which may or
may not be match patterns). I think the pattern format to use is
orthogonal to how to treat user-defined vs extension-defined
exceptions. I just would like the format to be consistent for both
kinds of exceptions, that's why I proposed to change the format for
user-defined exceptions as well, if we end up using match patterns.
Bernhard.
And throw some sort of error if the match pattern can't be converted
to a content setting pattern? I think I'd be okay with that.
Bernhard.
On Wed, Dec 15, 2010 at 1:56 PM, Bernhard Bauer <bau...@chromium.org> wrote:There's also the same reason we didn't use match patterns for theregular content settings UI, which is that it's not clear which rule
would take precedence in case of conflicts.I think it would be easy to define some order that developers would understand.
On Wed, Dec 15, 2010 at 5:44 AM, Jochen Eisinger <joc...@chromium.org> wrote:On Wed, Dec 15, 2010 at 1:56 PM, Bernhard Bauer <bau...@chromium.org> wrote:There's also the same reason we didn't use match patterns for theregular content settings UI, which is that it's not clear which rule
would take precedence in case of conflicts.I think it would be easy to define some order that developers would understand.We talked about this a long time when creating the content exceptions, because we had precisely the same thoughts: "let's use match patterns, we already have code and definitions for them and they're nice and flexible". In the end we could not come up with a sane and obvious preference order that made any sense to view/edit.Thus I strongly advise NOT using match patterns here, and sticking with our existing grammar. It was not randomly created. I am opposed to the "use match patterns and convert to content setting patterns" idea too; that imposes a pointless burden on both the implementation and the extension author. Please, just use the syntax we have today!
I also think you should make geolocation and notifications, which use a tuple of patterns, modifiable by extensions. As for user control over extension-set data, I suggest showing the content exceptions editor as normal, and allowing user edits to user-created entries; then below them showing a separate, read-only list of exceptions set by extension X.
PK
- a
Also, for using the content policy as a true content policy, this APIseems to fit well as a declarative model. However, not many Firefox
addons actually use the content policy as merely a simple URL-based
load/block decision point.