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

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

Issue 16625012: Remove ExtensionURLInfo, make security decisions in render process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/renderer/extensions/app_bindings.cc
diff --git a/chrome/renderer/extensions/app_bindings.cc b/chrome/renderer/extensions/app_bindings.cc
index 0c029348b663e9e3a1461e756676520087801f5d..babcb659945d87ba0f1764e5dcea15454abc29b5 100644
--- a/chrome/renderer/extensions/app_bindings.cc
+++ b/chrome/renderer/extensions/app_bindings.cc
@@ -117,10 +117,13 @@ v8::Handle<v8::Value> AppBindings::GetDetailsForFrame(
v8::Handle<v8::Value> AppBindings::GetDetailsForFrameImpl(
WebFrame* frame) {
+ if (frame->document().securityOrigin().isUnique())
+ return v8::Null();
+
const Extension* extension =
dispatcher_->extensions()->GetExtensionOrAppByURL(
- ExtensionURLInfo(frame->document().securityOrigin(),
- frame->document().url()));
+ frame->document().url());
+
if (!extension)
return v8::Null();
@@ -163,11 +166,11 @@ v8::Handle<v8::Value> AppBindings::GetRunningState(const v8::Arguments& args) {
// The app associated with the top level frame.
const Extension* parent_app = extensions->GetHostedAppByURL(
- ExtensionURLInfo(parent_frame->document().url()));
+ parent_frame->document().url());
// The app associated with this frame.
- const Extension* this_app = extensions->GetHostedAppByURL(ExtensionURLInfo(
- context()->web_frame()->document().url()));
+ const Extension* this_app = extensions->GetHostedAppByURL(
+ context()->web_frame()->document().url());
if (!this_app || !parent_app)
return v8::String::New(extension_misc::kAppStateCannotRun);

Powered by Google App Engine
This is Rietveld 408576698