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

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: sync @tott 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
« no previous file with comments | « extensions/renderer/user_script_injector.cc ('k') | extensions/renderer/user_script_set.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..30711c7832c478872aa2c3d873f6aa724ff9e2eb 100644
--- a/extensions/renderer/user_script_set.h
+++ b/extensions/renderer/user_script_set.h
@@ -32,9 +32,8 @@ class UserScriptSet {
public:
class Observer {
public:
- virtual void OnUserScriptsUpdated(
- const std::set<HostID>& changed_hosts,
- const std::vector<std::unique_ptr<UserScript>>& scripts) = 0;
+ virtual void OnUserScriptsUpdated(const std::set<HostID>& changed_hosts,
+ const UserScriptList& scripts) = 0;
};
UserScriptSet();
@@ -71,10 +70,6 @@ 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.
@@ -91,7 +86,7 @@ class UserScriptSet {
std::unique_ptr<base::SharedMemory> shared_memory_;
// The UserScripts this injector manages.
- std::vector<std::unique_ptr<UserScript>> scripts_;
+ UserScriptList scripts_;
// The associated observers.
base::ObserverList<Observer> observers_;
« no previous file with comments | « extensions/renderer/user_script_injector.cc ('k') | extensions/renderer/user_script_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698