Chromium Code Reviews
DescriptionRework some UserScriptLoader logic in preparation to removing UserScript copy.
Script removal does not need to store and operate on whole UserScript object,
only the scripts' id and host_id are enough. Make
UserScriptLoader::RemoveScript(s) take those ids (called UserScriptIDPair).
WebViewContentScriptManager also doesn't need the list of entire UserScript,
make them use UserScriptIDPair as well.
All the places that adds scripts usign UserScriptLoader::AddScripts, we
already have scripts with unique IDs generated. So turn those std::set
of scripts to std::vectors. Also add a dcheck that they are indeed unique.
BUG=622464
Committed: https://crrev.com/4884705e76ea2cda9dc7a5f189ecbba23ae5fb98
Cr-Commit-Position: refs/heads/master@{#411804}
Patch Set 1 #
Total comments: 22
Patch Set 2 : sync @tott #Patch Set 3 : address comments #Patch Set 4 : change UserScriptIDPair to set from map #Patch Set 5 : fix DCHECK #
Total comments: 10
Patch Set 6 : address comments from Devlin #Patch Set 7 : remove DCHECK as it is wrong #
Total comments: 4
Patch Set 8 : address comments #Patch Set 9 : sync @tott #Messages
Total messages: 27 (14 generated)
|