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

Unified Diff: chrome/renderer/extensions/dispatcher.cc

Issue 169053005: Allow cross-origin XHR in unblessed extension context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor content script origin logic Created 6 years, 10 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 | « no previous file | chrome/renderer/extensions/user_script_slave.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/dispatcher.cc
diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc
index efec6f00ec2d69b78286151e5e256552e423d5b4..04ada60f632378ff20c4a8ebec8e8c4c83877f26 100644
--- a/chrome/renderer/extensions/dispatcher.cc
+++ b/chrome/renderer/extensions/dispatcher.cc
@@ -1133,6 +1133,14 @@ void Dispatcher::DidCreateScriptContext(
new ChromeV8Context(v8_context, frame, extension, context_type);
v8_context_set_.Add(context);
+ if (context_type == Feature::CONTENT_SCRIPT_CONTEXT ||
not at google - send to devlin 2014/02/19 18:28:21 did "if (extension)" not work (and allow you to de
+ context_type == Feature::UNBLESSED_EXTENSION_CONTEXT) {
+ AddOrRemoveOriginPermissions(
+ UpdatedExtensionPermissionsInfo::ADDED,
+ extension,
+ PermissionsData::GetEffectiveHostPermissions(extension));
+ }
+
{
scoped_ptr<ModuleSystem> module_system(new ModuleSystem(context,
&source_map_));
« no previous file with comments | « no previous file | chrome/renderer/extensions/user_script_slave.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698