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

Unified Diff: extensions/common/extension.cc

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: Minor formatting 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
Index: extensions/common/extension.cc
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
index 8aefc6af954bef0c8ff3b23e2b83debd4f06667a..f436d7c68dc01dbf4467d561680291f398d312be 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"
@@ -440,7 +441,8 @@ bool Extension::is_theme() const {
bool Extension::can_be_incognito_enabled() const {
// Only component platform apps are supported in incognito.
- return !is_platform_app() || location() == Manifest::COMPONENT;
+ return IncognitoInfo::IsIncognitoAllowed(this) &&
not at google - send to devlin 2015/09/17 22:59:54 This function has too much logic, especially for o
Not at Google. Contact bengr 2015/09/18 21:24:31 Done.
+ (!is_platform_app() || location() == Manifest::COMPONENT);
}
void Extension::AddWebExtentPattern(const URLPattern& pattern) {
« no previous file with comments | « no previous file | extensions/common/manifest_constants.h » ('j') | extensions/common/manifest_handlers/incognito_info.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698