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

Unified Diff: extensions/renderer/user_script_set.h

Issue 2193093002: [UserScript cleanup] Remove use of ScopedVector from UserScriptSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 d7baffd0194ac4eb54fa18c49ec22b290cf57bbe..8b28d768abd7fc5d25863bed9760a357b296c43a 100644
--- a/extensions/renderer/user_script_set.h
+++ b/extensions/renderer/user_script_set.h
@@ -34,7 +34,7 @@ class UserScriptSet {
public:
virtual void OnUserScriptsUpdated(
const std::set<HostID>& changed_hosts,
- const std::vector<UserScript*>& scripts) = 0;
+ const std::vector<std::unique_ptr<UserScript>>& scripts) = 0;
};
UserScriptSet();
@@ -71,7 +71,9 @@ class UserScriptSet {
const std::set<HostID>& changed_hosts,
bool whitelisted_only);
- const std::vector<UserScript*>& scripts() const { return scripts_.get(); }
+ const std::vector<std::unique_ptr<UserScript>>& scripts() const {
+ return scripts_;
+ }
private:
// Returns a new ScriptInjection for the given |script| to execute in the
@@ -89,7 +91,7 @@ class UserScriptSet {
std::unique_ptr<base::SharedMemory> shared_memory_;
// The UserScripts this injector manages.
- ScopedVector<UserScript> scripts_;
+ std::vector<std::unique_ptr<UserScript>> 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