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

Unified Diff: extensions/renderer/user_script_set.h

Issue 2227193002: Make UserScript non-copyable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: uplaod with base Created 4 years, 4 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/user_script_set.h
diff --git a/extensions/renderer/user_script_set.h b/extensions/renderer/user_script_set.h
index 8b28d768abd7fc5d25863bed9760a357b296c43a..5ee550b4c62c0abfcb66117cffe81ef9fe42fdcf 100644
--- a/extensions/renderer/user_script_set.h
+++ b/extensions/renderer/user_script_set.h
@@ -15,6 +15,7 @@
#include "base/memory/shared_memory.h"
#include "base/observer_list.h"
#include "extensions/common/user_script.h"
+#include "extensions/renderer/renderer_user_script.h"
class GURL;
@@ -34,7 +35,7 @@ class UserScriptSet {
public:
virtual void OnUserScriptsUpdated(
const std::set<HostID>& changed_hosts,
- const std::vector<std::unique_ptr<UserScript>>& scripts) = 0;
+ const std::vector<std::unique_ptr<RendererUserScript>>& scripts) = 0;
};
UserScriptSet();
@@ -71,15 +72,11 @@ class UserScriptSet {
const std::set<HostID>& changed_hosts,
bool whitelisted_only);
- const std::vector<std::unique_ptr<UserScript>>& scripts() const {
- return scripts_;
- }
-
private:
// Returns a new ScriptInjection for the given |script| to execute in the
// |render_frame|, or NULL if the script should not execute.
std::unique_ptr<ScriptInjection> GetInjectionForScript(
- const UserScript* script,
+ const RendererUserScript* script,
content::RenderFrame* render_frame,
int tab_id,
UserScript::RunLocation run_location,
@@ -91,7 +88,7 @@ class UserScriptSet {
std::unique_ptr<base::SharedMemory> shared_memory_;
// The UserScripts this injector manages.
- std::vector<std::unique_ptr<UserScript>> scripts_;
+ std::vector<std::unique_ptr<RendererUserScript>> scripts_;
// The associated observers.
base::ObserverList<Observer> observers_;

Powered by Google App Engine
This is Rietveld 408576698