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

Unified Diff: extensions/browser/user_script_loader.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
Index: extensions/browser/user_script_loader.h
diff --git a/extensions/browser/user_script_loader.h b/extensions/browser/user_script_loader.h
index 1d7aaf010ff6019957cd09de8ba81c1e2a35f86e..117b9acd72f4129a1899df2a8eabe6a2c020403a 100644
--- a/extensions/browser/user_script_loader.h
+++ b/extensions/browser/user_script_loader.h
@@ -58,7 +58,7 @@ class UserScriptLoader : public content::NotificationObserver {
~UserScriptLoader() override;
// Add |scripts| to the set of scripts managed by this loader.
- void AddScripts(const UserScriptList& scripts);
+ void AddScripts(std::unique_ptr<UserScriptList> scripts);
// Add |scripts| to the set of scripts managed by this loader.
// The fetch of the content of the script starts URL request
@@ -66,7 +66,7 @@ class UserScriptLoader : public content::NotificationObserver {
// |render_process_id, render_frame_id|.
// TODO(hanxi): The renderer information doesn't really belong in this base
// class, but it's not an easy fix.
- virtual void AddScripts(const UserScriptList& scripts,
+ virtual void AddScripts(std::unique_ptr<UserScriptList> scripts,
int render_process_id,
int render_frame_id);
@@ -150,7 +150,7 @@ class UserScriptLoader : public content::NotificationObserver {
// The mutually-exclusive information about sets of scripts that were added or
// removed since the last script load. These maps are keyed by script ids.
// Note that we only need HostID information for removal.
- std::map<int, UserScript> added_scripts_map_;
+ std::map<int, std::unique_ptr<UserScript>> added_scripts_map_;
std::set<UserScriptIDPair> removed_script_hosts_;
// Indicates whether the the collection of scripts should be cleared before
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_content_script_manager.cc ('k') | extensions/browser/user_script_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698