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

Side by Side 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, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_ 5 #ifndef EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_
6 #define EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_ 6 #define EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "extensions/renderer/script_injection.h" 10 #include "extensions/renderer/script_injection.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // Notify the browser that the script was injected (or never will be), and 58 // Notify the browser that the script was injected (or never will be), and
59 // send along any results or errors. 59 // send along any results or errors.
60 void Finish(const std::string& error); 60 void Finish(const std::string& error);
61 61
62 // The parameters for injecting the script. 62 // The parameters for injecting the script.
63 scoped_ptr<ExtensionMsg_ExecuteCode_Params> params_; 63 scoped_ptr<ExtensionMsg_ExecuteCode_Params> params_;
64 64
65 // The url of the frame into which we are injecting. 65 // The url of the frame into which we are injecting.
66 GURL url_; 66 GURL url_;
67 67
68 // The URL of the frame's origin. This is usually identical to |url_|, but
69 // could be different for e.g. about:blank URLs. Do not use this value to make
70 // security decisions, to avoid race conditions (e.g. due to navigation).
71 GURL effective_url_;
72
68 // The RenderView to which we send the response upon completion. 73 // The RenderView to which we send the response upon completion.
69 content::RenderView* render_view_; 74 content::RenderView* render_view_;
70 75
71 // The results of the script execution. 76 // The results of the script execution.
72 scoped_ptr<base::ListValue> results_; 77 scoped_ptr<base::ListValue> results_;
73 78
74 // Whether or not this script injection has finished. 79 // Whether or not this script injection has finished.
75 bool finished_; 80 bool finished_;
76 81
77 DISALLOW_COPY_AND_ASSIGN(ProgrammaticScriptInjector); 82 DISALLOW_COPY_AND_ASSIGN(ProgrammaticScriptInjector);
78 }; 83 };
79 84
80 } // namespace extensions 85 } // namespace extensions
81 86
82 #endif // EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_ 87 #endif // EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_
OLDNEW
« 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