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

Unified Diff: extensions/renderer/programmatic_script_injector.h

Issue 2471553003: Fix content script injection not working with PlzNavigate because of different navigation timings. (Closed)
Patch Set: Created 4 years, 1 month 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 aa510840b2e53de01dc63b1e30e76f8b8181b980..6163ec6280328aa03278f3498d33da1f7258c480 100644
--- a/extensions/renderer/programmatic_script_injector.h
+++ b/extensions/renderer/programmatic_script_injector.h
@@ -23,8 +23,8 @@ namespace extensions {
// A ScriptInjector to handle tabs.executeScript().
class ProgrammaticScriptInjector : public ScriptInjector {
public:
- ProgrammaticScriptInjector(const ExtensionMsg_ExecuteCode_Params& params,
- content::RenderFrame* render_frame);
+ explicit ProgrammaticScriptInjector(
+ const ExtensionMsg_ExecuteCode_Params& params);
~ProgrammaticScriptInjector() override;
private:
@@ -71,11 +71,11 @@ class ProgrammaticScriptInjector : public ScriptInjector {
std::unique_ptr<ExtensionMsg_ExecuteCode_Params> params_;
// The url of the frame into which we are injecting.
- GURL url_;
+ mutable GURL url_;
Devlin 2016/11/01 23:39:32 It makes me sad that these are mutable. I think h
jam 2016/11/01 23:47:03 agreed I prefer mutable too, I thought there was a
// 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_;
+ mutable std::string origin_for_about_error_;
// The results of the script execution.
base::ListValue results_;

Powered by Google App Engine
This is Rietveld 408576698