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}
diff --git a/extensions/browser/extension_util.h b/extensions/browser/extension_util.h
index 6bd3c86..b5f758e 100644
--- a/extensions/browser/extension_util.h
+++ b/extensions/browser/extension_util.h
@@ -14,7 +14,7 @@
}
namespace extensions {
-
+class Extension;
struct ExtensionInfo;
namespace util {
@@ -40,6 +40,9 @@
bool SiteHasIsolatedStorage(const GURL& extension_site_url,
content::BrowserContext* context);
+// Returns true if the extension can be enabled in incognito mode.
+bool CanBeIncognitoEnabled(const Extension* extension);
+
} // namespace util
} // namespace extensions