Enabling extensions in incognito

467 views
Skip to first unread message

Matt Perry

unread,
Mar 5, 2010, 2:03:53 PM3/5/10
to Chromium-extensions
With the latest Chrome dev channel build (5.0.342.1), you can now enable extensions in incognito mode. This feature is still in development, so to reach it, you need to launch chrome with this commandline flag: --enable-experimental-extension-apis .

At the moment, what this does is add an "enable in incognito" toggle to the extensions management page, so you can flip the switch for each extension separately. The reason this isn't enabled by default is that once enabled, there's nothing preventing the extension from writing your incognito data to disk (which defeats the purpose of incognito mode). It is up to the user to trust that the extension will do the right thing.

Note that this feature is still experimental, and is subject to change/break. I'm considering modifying the extension APIs so that developers have to be more explicit in order to work in incognito mode, but this is a good first step.

Please file any bugs you find with extensions working in incognito and CC me with them.

For more information about this effort, see my design doc here: http://www.chromium.org/developers/design-documents/extensions/incognito

krtulmay

unread,
Mar 6, 2010, 11:48:00 AM3/6/10
to Chromium-extensions
This is great work Matt!

One question: I am running with extensions in Incognito mode now.

When I click the Options button of an extension from chrome://extensions
or click Options from the context menu from the extension's icon, a
tab with chrome-extension://the-extension-id/theoptionspage.html tries
to open, but I get the error:

This webpage is not available.
The webpage at chrome-extension://the-extension-id/theoptionspage.html
might be temporarily down or it may have moved permanently to a new
web address. More information on this error. Below is the original
error message
Error 109 (net::ERR_ADDRESS_UNREACHABLE): Unknown error.

Is this a known issue? Is there a bug number for me to track?

Daniel Wagner-Hall

unread,
Mar 6, 2010, 12:52:39 PM3/6/10
to Matt Perry, Chromium-extensions
On 5 March 2010 19:03, Matt Perry <mpcom...@chromium.org> wrote:
> With the latest Chrome dev channel build (5.0.342.1), you can now enable
> extensions in incognito mode. This feature is still in development, so to
> reach it, you need to launch chrome with this commandline flag:
> --enable-experimental-extension-apis .
> At the moment, what this does is add an "enable in incognito" toggle to the
> extensions management page, so you can flip the switch for each extension
> separately. The reason this isn't enabled by default is that once enabled,
> there's nothing preventing the extension from writing your incognito data to
> disk (which defeats the purpose of incognito mode). It is up to the user to
> trust that the extension will do the right thing.

Is it yet possible for the extension writer to know whether a content
script/tab is running in an incognito window or not? This would make
it a lot easier for extension writers to Do The Right Thing in
incognito mode.

(I understand this may be further down the timeline, and am impressed
at how fast you've gotten this far! Just wondering :))

Matt Perry

unread,
Mar 8, 2010, 1:38:44 PM3/8/10
to Daniel Wagner-Hall, Chromium-extensions
On Sat, Mar 6, 2010 at 9:52 AM, Daniel Wagner-Hall <dawa...@gmail.com> wrote:
On 5 March 2010 19:03, Matt Perry <mpcom...@chromium.org> wrote:
> With the latest Chrome dev channel build (5.0.342.1), you can now enable
> extensions in incognito mode. This feature is still in development, so to
> reach it, you need to launch chrome with this commandline flag:
> --enable-experimental-extension-apis .
> At the moment, what this does is add an "enable in incognito" toggle to the
> extensions management page, so you can flip the switch for each extension
> separately. The reason this isn't enabled by default is that once enabled,
> there's nothing preventing the extension from writing your incognito data to
> disk (which defeats the purpose of incognito mode). It is up to the user to
> trust that the extension will do the right thing.

Is it yet possible for the extension writer to know whether a content
script/tab is running in an incognito window or not? This would make
it a lot easier for extension writers to Do The Right Thing in
incognito mode.

Yes, the 'tab' object (accessible through port.sender.tab or sender.tab, depending on whether you use onConnect or onRequest) has an 'incognito' boolean that is true for incognito tabs. This applies to all tab (and window) objects, in fact.

Matt Perry

unread,
Mar 8, 2010, 1:42:19 PM3/8/10
to krtulmay, Chromium-extensions
Thanks for the bug report. I filed http://code.google.com/p/chromium/issues/detail?id=37677

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


Daniel Wagner-Hall

unread,
Mar 8, 2010, 2:43:15 PM3/8/10
to Matt Perry, Chromium-extensions
On 5 March 2010 19:03, Matt Perry <mpcom...@chromium.org> wrote:

I'm guessing that the incognito permission just hasn't been
implemented yet, as if I add it, I still get the this extension
doesn't officially support incognito warning?

Will adding the incognito permission be an escalation of permissions
that users are warned about upon update, or does it just act as a flag
which indicates that the extension supports it, for warning people
when enabling the extension in incognito mode? Permissions strikes me
as a slightly odd place to put the flag, if the latter.

Matt Perry

unread,
Mar 8, 2010, 2:56:42 PM3/8/10
to Daniel Wagner-Hall, Chromium-extensions
On Mon, Mar 8, 2010 at 11:43 AM, Daniel Wagner-Hall <dawa...@gmail.com> wrote:
On 5 March 2010 19:03, Matt Perry <mpcom...@chromium.org> wrote:
> With the latest Chrome dev channel build (5.0.342.1), you can now enable
> extensions in incognito mode. This feature is still in development, so to
> reach it, you need to launch chrome with this commandline flag:
> --enable-experimental-extension-apis .
> At the moment, what this does is add an "enable in incognito" toggle to the
> extensions management page, so you can flip the switch for each extension
> separately. The reason this isn't enabled by default is that once enabled,
> there's nothing preventing the extension from writing your incognito data to
> disk (which defeats the purpose of incognito mode). It is up to the user to
> trust that the extension will do the right thing.
> Note that this feature is still experimental, and is subject to
> change/break. I'm considering modifying the extension APIs so that
> developers have to be more explicit in order to work in incognito mode, but
> this is a good first step.
> Please file any bugs you find with extensions working in incognito and CC me
> with them.
> For more information about this effort, see my design doc
> here: http://www.chromium.org/developers/design-documents/extensions/incognito

I'm guessing that the incognito permission just hasn't been
implemented yet, as if I add it, I still get the this extension
doesn't officially support incognito warning?

It has, but there is a bug :). I'll have a fix out shortly.
 
Will adding the incognito permission be an escalation of permissions
that users are warned about upon update, or does it just act as a flag
which indicates that the extension supports it, for warning people
when enabling the extension in incognito mode? Permissions strikes me
as a slightly odd place to put the flag, if the latter.

For now, it's the latter. I agree it's a little weird, but I think that's OK. In the future it may allow access to special incognito-only APIs.

Daniel Wagner-Hall

unread,
Mar 8, 2010, 3:01:55 PM3/8/10
to Matt Perry, Chromium-extensions
On 8 March 2010 19:56, Matt Perry <mpcom...@chromium.org> wrote:
>> Will adding the incognito permission be an escalation of permissions
>> that users are warned about upon update, or does it just act as a flag
>> which indicates that the extension supports it, for warning people
>> when enabling the extension in incognito mode? Permissions strikes me
>> as a slightly odd place to put the flag, if the latter.
>
> For now, it's the latter. I agree it's a little weird, but I think that's
> OK. In the future it may allow access to special incognito-only APIs.

What kind of APIs? If in the future, special capabilities are
available, I would definitely suggest moving it to a non-permissions
flag (as well as a permissions field, for those capabilities) -
supporting incognito mode and requesting special capabilities are
different things with different consequences, and merging the two into
one permission for convenience seems to move away from the least
privilege ideas behind permissions.

Reply all
Reply to author
Forward
0 new messages