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

Unified Diff: extensions/renderer/programmatic_script_injector.h

Issue 945743003: Improve error message for failing code insertion on about:-URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add origin to error message Created 5 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 | « extensions/common/manifest_constants.cc ('k') | extensions/renderer/programmatic_script_injector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/programmatic_script_injector.h
diff --git a/extensions/renderer/programmatic_script_injector.h b/extensions/renderer/programmatic_script_injector.h
index e6655cdc0a714d524979fb45a4ab94590c183aff..085c92c337e642e0091d82beabed3b9459a52ec3 100644
--- a/extensions/renderer/programmatic_script_injector.h
+++ b/extensions/renderer/programmatic_script_injector.h
@@ -65,6 +65,11 @@ class ProgrammaticScriptInjector : public ScriptInjector {
// The url of the frame into which we are injecting.
GURL url_;
+ // The URL of the frame's origin. This is usually identical to |url_|, but
+ // could be different for e.g. about:blank URLs. Do not use this value to make
+ // security decisions, to avoid race conditions (e.g. due to navigation).
+ GURL effective_url_;
+
// The RenderView to which we send the response upon completion.
content::RenderView* render_view_;
« no previous file with comments | « extensions/common/manifest_constants.cc ('k') | extensions/renderer/programmatic_script_injector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698