From e548e74412d0a18f8829ce60201eb953a700b09b Mon Sep 17 00:00:00 2001 From: kundaji Date: Fri, 18 Sep 2015 16:19:09 -0700 Subject: 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} --- extensions/test/data/manifest_tests/incognito_not_allowed.json | 5 +++++ extensions/test/data/manifest_tests/incognito_spanning.json | 5 +++++ extensions/test/data/manifest_tests/incognito_split.json | 5 +++++ extensions/test/data/manifest_tests/minimal.json | 4 ++++ 4 files changed, 19 insertions(+) create mode 100644 extensions/test/data/manifest_tests/incognito_not_allowed.json create mode 100644 extensions/test/data/manifest_tests/incognito_spanning.json create mode 100644 extensions/test/data/manifest_tests/incognito_split.json create mode 100644 extensions/test/data/manifest_tests/minimal.json (limited to 'extensions/test') diff --git a/extensions/test/data/manifest_tests/incognito_not_allowed.json b/extensions/test/data/manifest_tests/incognito_not_allowed.json new file mode 100644 index 0000000..f44d252 --- /dev/null +++ b/extensions/test/data/manifest_tests/incognito_not_allowed.json @@ -0,0 +1,5 @@ +{ + "name": "test", + "version": "1", + "incognito": "not_allowed" +} diff --git a/extensions/test/data/manifest_tests/incognito_spanning.json b/extensions/test/data/manifest_tests/incognito_spanning.json new file mode 100644 index 0000000..7e54be4 --- /dev/null +++ b/extensions/test/data/manifest_tests/incognito_spanning.json @@ -0,0 +1,5 @@ +{ + "name": "test", + "version": "1", + "incognito": "spanning" +} diff --git a/extensions/test/data/manifest_tests/incognito_split.json b/extensions/test/data/manifest_tests/incognito_split.json new file mode 100644 index 0000000..5bb8b67 --- /dev/null +++ b/extensions/test/data/manifest_tests/incognito_split.json @@ -0,0 +1,5 @@ +{ + "name": "test", + "version": "1", + "incognito": "split" +} diff --git a/extensions/test/data/manifest_tests/minimal.json b/extensions/test/data/manifest_tests/minimal.json new file mode 100644 index 0000000..0d9792a --- /dev/null +++ b/extensions/test/data/manifest_tests/minimal.json @@ -0,0 +1,4 @@ +{ + "name": "test", + "version": "1" +} -- cgit v1.1