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

Unified Diff: extensions/renderer/script_context.cc

Issue 1010473002: Revert of Move Extension ScriptContext creation into ScriptContextSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/renderer/script_context.h ('k') | extensions/renderer/script_context_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context.cc
diff --git a/extensions/renderer/script_context.cc b/extensions/renderer/script_context.cc
index 47a3c2a6cc0b5d050e492a833a175d29a1dbe935..e5677aadb10597498e0b4d5019bc8cc4d084fd8f 100644
--- a/extensions/renderer/script_context.cc
+++ b/extensions/renderer/script_context.cc
@@ -13,19 +13,15 @@
#include "content/public/common/url_constants.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
-#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_api.h"
-#include "extensions/common/extension_set.h"
#include "extensions/common/extension_urls.h"
#include "extensions/common/features/base_feature_provider.h"
-#include "extensions/common/manifest_handlers/sandboxed_page_info.h"
#include "extensions/common/permissions/permissions_data.h"
#include "gin/per_context_data.h"
#include "third_party/WebKit/public/web/WebDataSource.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h"
-#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
#include "third_party/WebKit/public/web/WebView.h"
@@ -79,7 +75,7 @@
};
ScriptContext::ScriptContext(const v8::Handle<v8::Context>& v8_context,
- blink::WebLocalFrame* web_frame,
+ blink::WebFrame* web_frame,
const Extension* extension,
Feature::Context context_type,
const Extension* effective_extension,
@@ -114,21 +110,6 @@
Invalidate();
}
-// static
-bool ScriptContext::IsSandboxedPage(const ExtensionSet& extensions,
- const GURL& url) {
- // TODO(kalman): This is checking for the wrong thing, it should be checking
- // if the frame's security origin is unique. The extension sandbox directive
- // is checked for in extensions/common/manifest_handlers/csp_info.cc.
- if (url.SchemeIs(kExtensionScheme)) {
- const Extension* extension = extensions.GetByID(url.host());
- if (extension) {
- return SandboxedPageInfo::IsSandboxedPage(extension, url.path());
- }
- }
- return false;
-}
-
void ScriptContext::Invalidate() {
if (!is_valid())
return;
« no previous file with comments | « extensions/renderer/script_context.h ('k') | extensions/renderer/script_context_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698