diff options
author | kundaji <kundaji@chromium.org> | 2015-09-18 16:19:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-18 23:19:46 +0000 |
commit | e548e74412d0a18f8829ce60201eb953a700b09b (patch) | |
tree | 4ead1264cfb19591b40be5177c35ba7bbb473970 /extensions/common/extension.cc | |
parent | 7305eb15590a4a3b363eeed2f1ed1b8638ee37fe (diff) | |
download | chromium_src-e548e74412d0a18f8829ce60201eb953a700b09b.zip chromium_src-e548e74412d0a18f8829ce60201eb953a700b09b.tar.gz chromium_src-e548e74412d0a18f8829ce60201eb953a700b09b.tar.bz2 |
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}
Diffstat (limited to 'extensions/common/extension.cc')
-rw-r--r-- | extensions/common/extension.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc index 8aefc6a..9328ba2 100644 --- a/extensions/common/extension.cc +++ b/extensions/common/extension.cc @@ -28,6 +28,7 @@ #include "extensions/common/manifest.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/manifest_handler.h" +#include "extensions/common/manifest_handlers/incognito_info.h" #include "extensions/common/manifest_handlers/permissions_parser.h" #include "extensions/common/permissions/permission_set.h" #include "extensions/common/permissions/permissions_data.h" @@ -438,11 +439,6 @@ bool Extension::is_theme() const { return manifest()->is_theme(); } -bool Extension::can_be_incognito_enabled() const { - // Only component platform apps are supported in incognito. - return !is_platform_app() || location() == Manifest::COMPONENT; -} - void Extension::AddWebExtentPattern(const URLPattern& pattern) { // Bookmark apps are permissionless. if (from_bookmark()) |