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

Unified Diff: extensions/renderer/user_script_set_manager.cc

Issue 1293673002: Create thread-safe RendererExtensionRegistry from ExtensionSet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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_set_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/user_script_set_manager.cc
diff --git a/extensions/renderer/user_script_set_manager.cc b/extensions/renderer/user_script_set_manager.cc
index e2a7675c1d92a5980fe976a33a565368c2df877b..c131577608099820e9b83fc2114774ff93e5bc78 100644
--- a/extensions/renderer/user_script_set_manager.cc
+++ b/extensions/renderer/user_script_set_manager.cc
@@ -15,9 +15,7 @@
namespace extensions {
-UserScriptSetManager::UserScriptSetManager(const ExtensionSet* extensions)
- : static_scripts_(extensions),
- extensions_(extensions) {
+UserScriptSetManager::UserScriptSetManager() {
content::RenderThread::Get()->AddObserver(this);
}
@@ -117,7 +115,7 @@ void UserScriptSetManager::OnUpdateUserScripts(
// or just the owner.
CHECK(changed_hosts.size() <= 1);
if (programmatic_scripts_.find(host_id) == programmatic_scripts_.end()) {
- scripts = new UserScriptSet(extensions_);
+ scripts = new UserScriptSet();
programmatic_scripts_[host_id] = make_linked_ptr(scripts);
} else {
scripts = programmatic_scripts_[host_id].get();
@@ -138,7 +136,8 @@ void UserScriptSetManager::OnUpdateUserScripts(
// No owner => all known hosts.
// Owner => just the owner host.
if (host_id.id().empty()) {
- std::set<std::string> extension_ids = extensions_->GetIDs();
+ std::set<std::string> extension_ids =
+ RendererExtensionRegistry::Get()->GetIDs();
for (const std::string& extension_id : extension_ids)
all_hosts.insert(HostID(HostID::EXTENSIONS, extension_id));
} else {
« no previous file with comments | « extensions/renderer/user_script_set_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698