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

Unified Diff: chrome/browser/extensions/extension_protocols.cc

Issue 3210007: Add support for a "split" incognito behavior for extensions. (Closed)
Patch Set: latest Created 10 years, 4 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/extension_protocols.cc
diff --git a/chrome/browser/extensions/extension_protocols.cc b/chrome/browser/extensions/extension_protocols.cc
index 30f7b377dfc27b8ab937807112715076612c35bd..f281c7408bcfd888460642a4d934d8080072ad1c 100644
--- a/chrome/browser/extensions/extension_protocols.cc
+++ b/chrome/browser/extensions/extension_protocols.cc
@@ -99,7 +99,8 @@ bool AllowExtensionResourceLoad(URLRequest* request,
// This is because an extension must run in a single process, and an
// incognito tab prevents that.
if (context->is_off_the_record() &&
- info->resource_type() == ResourceType::MAIN_FRAME) {
+ info->resource_type() == ResourceType::MAIN_FRAME &&
+ !context->ExtensionCanLoadInIncognito(request->url().host())) {
LOG(ERROR) << "Denying load of " << request->url().spec() << " from "
<< "incognito tab.";
return false;
« no previous file with comments | « chrome/browser/extensions/extension_process_manager_unittest.cc ('k') | chrome/browser/extensions/extension_sidebar_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698