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

Unified Diff: extensions/renderer/programmatic_script_injector.h

Issue 1628423002: Add frameId to chrome.tabs.executeScript/insertCSS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permissiondata-remove-process_id
Patch Set: Revert to wc->GetURL for chrome.tabs.update Created 4 years, 11 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/programmatic_script_injector.h
diff --git a/extensions/renderer/programmatic_script_injector.h b/extensions/renderer/programmatic_script_injector.h
index 159ff1c5f4dd072e89ceee87751cc4e69f576803..a7af9ff381885b18c5a3ce111bf14fa7c9dbc57e 100644
--- a/extensions/renderer/programmatic_script_injector.h
+++ b/extensions/renderer/programmatic_script_injector.h
@@ -50,6 +50,9 @@ class ProgrammaticScriptInjector : public ScriptInjector {
void OnWillNotInject(InjectFailureReason reason,
content::RenderFrame* render_frame) override;
+ // Whether it is safe to include information about the URL in error messages.
+ bool CanShowUrlInError() const;
+
// Return the run location for this injector.
UserScript::RunLocation GetRunLocation() const;
@@ -63,10 +66,9 @@ 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 serialization of the frame's origin if the frame is an about:-URL. This
+ // is used to provide user-friendly messages.
+ std::string origin_for_about_error_;
// The results of the script execution.
base::ListValue results_;

Powered by Google App Engine
This is Rietveld 408576698