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

Unified Diff: extensions/renderer/script_injection.cc

Issue 1335083004: [Extensions] Don't allow extensions to inject scripts into extension pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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: extensions/renderer/script_injection.cc
diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
index 12d7cfd0d19561cdfceb681009af0db64ab3ee93..dfc402de4909164e10222e3ab825fa3f2d2fa44a 100644
--- a/extensions/renderer/script_injection.cc
+++ b/extensions/renderer/script_injection.cc
@@ -140,14 +140,6 @@ ScriptInjection::InjectionResult ScriptInjection::TryToInject(
NotifyWillNotInject(ScriptInjector::NOT_ALLOWED);
return INJECTION_FINISHED; // We're done.
case PermissionsData::ACCESS_WITHHELD:
- // Note: we don't consider ACCESS_WITHHELD for child frames because there
- // is nowhere to surface a request for a child frame.
- // TODO(devlin): We should ask for permission somehow. crbug.com/491402.
- if (web_frame->parent()) {
- NotifyWillNotInject(ScriptInjector::NOT_ALLOWED);
- return INJECTION_FINISHED;
- }
-
SendInjectionMessage(true /* request permission */);
not at google - send to devlin 2015/09/11 22:46:39 This change means that you're always going to be s
Devlin 2015/09/11 22:55:02 Nope, because the logic to choose allowed or not a
not at google - send to devlin 2015/09/11 23:09:49 I see. I read these methods in reverse.
return INJECTION_WAITING; // Wait around for permission.
case PermissionsData::ACCESS_ALLOWED:

Powered by Google App Engine
This is Rietveld 408576698