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

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: address feedback Created 7 years, 5 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 | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/extensions/dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/app_bindings.cc
diff --git a/chrome/renderer/extensions/app_bindings.cc b/chrome/renderer/extensions/app_bindings.cc
index 8f07ed2d5730fe0cbc29774cfdd64b4a0e8d15fd..268727a2a7bbdbc22224bf38fffe39d9f6ef53e8 100644
--- a/chrome/renderer/extensions/app_bindings.cc
+++ b/chrome/renderer/extensions/app_bindings.cc
@@ -119,10 +119,13 @@ void 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();
@@ -166,11 +169,11 @@ void AppBindings::GetRunningState(
// 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) {
args.GetReturnValue().Set(
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/extensions/dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698