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

Unified Diff: chrome/browser/extensions/api/messaging/message_service.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: 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
Index: chrome/browser/extensions/api/messaging/message_service.cc
diff --git a/chrome/browser/extensions/api/messaging/message_service.cc b/chrome/browser/extensions/api/messaging/message_service.cc
index 36e1e32eda76a20264fed438baa3ceac8259353d..5c1a219e7613f18f482fc6106e72ed725d4f2cd0 100644
--- a/chrome/browser/extensions/api/messaging/message_service.cc
+++ b/chrome/browser/extensions/api/messaging/message_service.cc
@@ -37,6 +37,7 @@
#include "extensions/browser/extension_host.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
+#include "extensions/browser/extension_util.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/browser/guest_view/web_view/web_view_guest.h"
#include "extensions/browser/lazy_background_task_queue.h"
@@ -371,7 +372,7 @@ void MessageService::OpenChannelToExtension(
// that surface (e.g. chrome://extensions) should be the only one for
// enabling in incognito. In practice this means platform apps only.
if (!is_web_connection || IncognitoInfo::IsSplitMode(target_extension) ||
- target_extension->can_be_incognito_enabled()) {
+ util::CanBeIncognitoEnabled(target_extension)) {
OnOpenChannelAllowed(params.Pass(), false);
return;
}

Powered by Google App Engine
This is Rietveld 408576698