Allow extensions to specify that they are not allowed in incognito mode.
commite548e74412d0a18f8829ce60201eb953a700b09b
authorkundaji <kundaji@chromium.org>
Fri, 18 Sep 2015 23:19:09 +0000 (18 16:19 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 18 Sep 2015 23:19:46 +0000 (18 23:19 +0000)
tree4ead1264cfb19591b40be5177c35ba7bbb473970
parent7305eb15590a4a3b363eeed2f1ed1b8638ee37fe
Allow extensions to specify that they are not allowed in incognito mode.

Add "not_allowed" as a valid value to the "incognito" field in the
manifest. Track incognito behavior using an enum instead of a boolean
to distinguish between "split", "spanning", and "not_allowed". Add
CanBeIncognitoEnabled method to utils which checks the manifest entry
in addition to checking if extension is platform app or component.

BUG=455756

Review URL: https://codereview.chromium.org/1351223003

Cr-Commit-Position: refs/heads/master@{#349806}
18 files changed:
chrome/browser/extensions/api/developer_private/extension_info_generator.cc
chrome/browser/extensions/api/messaging/message_service.cc
chrome/browser/extensions/extension_util.cc
chrome/browser/extensions/installed_loader.cc
extensions/browser/extension_util.cc
extensions/browser/extension_util.h
extensions/common/extension.cc
extensions/common/extension.h
extensions/common/manifest_constants.cc
extensions/common/manifest_constants.h
extensions/common/manifest_handlers/incognito_info.cc
extensions/common/manifest_handlers/incognito_info.h
extensions/common/manifest_handlers/incognito_manifest_unittest.cc [new file with mode: 0644]
extensions/extensions_tests.gypi
extensions/test/data/manifest_tests/incognito_not_allowed.json [new file with mode: 0644]
extensions/test/data/manifest_tests/incognito_spanning.json [new file with mode: 0644]
extensions/test/data/manifest_tests/incognito_split.json [new file with mode: 0644]
extensions/test/data/manifest_tests/minimal.json [new file with mode: 0644]