Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: extensions/common/manifest_handlers/incognito_info.h

Issue 1351223003: Allow extensions to specify that they are not allowed in incognito mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add expectations for IncognitoInfo to test Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/common/manifest_constants.cc ('k') | extensions/common/manifest_handlers/incognito_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/manifest_handlers/incognito_info.h
diff --git a/extensions/common/manifest_handlers/incognito_info.h b/extensions/common/manifest_handlers/incognito_info.h
index 0b7a8706e07440d1aa7c63461b28d559e3404b0b..c217a23cb08958eaa2b1cfc1fe3c5749a6787947 100644
--- a/extensions/common/manifest_handlers/incognito_info.h
+++ b/extensions/common/manifest_handlers/incognito_info.h
@@ -12,15 +12,22 @@
namespace extensions {
struct IncognitoInfo : public Extension::ManifestData {
- explicit IncognitoInfo(bool split_mode);
+ enum Mode { SPLIT, SPANNING, NOT_ALLOWED };
+
+ explicit IncognitoInfo(Mode mode);
+
~IncognitoInfo() override;
// If true, a separate process will be used for the extension in incognito
// mode.
- bool split_mode;
+ Mode mode;
// Return the incognito mode information for the given |extension|.
static bool IsSplitMode(const Extension* extension);
+
+ // Return whether this extension can be run in incognito mode as specified
+ // in its manifest.
+ static bool IsIncognitoAllowed(const Extension* extension);
};
// Parses the "incognito" manifest key.
« no previous file with comments | « extensions/common/manifest_constants.cc ('k') | extensions/common/manifest_handlers/incognito_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698