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

Unified Diff: extensions/renderer/user_script_set_manager.cc

Issue 420543002: Declarative content scripts: Browser-side: per-extension shared memory regions (lazily loaded) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor UserScriptMaster into UserScriptLoader, managed by SharedUserScriptMaster and DeclarativeU… Created 6 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/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 6aa22d91dc8351ceac92d7d4889790c521eb0163..9e98aadf037724888f3164e7f40ba846c908f4cd 100644
--- a/extensions/renderer/user_script_set_manager.cc
+++ b/extensions/renderer/user_script_set_manager.cc
@@ -107,21 +107,11 @@ void UserScriptSetManager::OnUpdateUserScripts(
}
DCHECK(scripts);
- // If no extensions are included in the set, that indicates that all
- // extensions were updated. Add them all to the set so that observers and
- // individual UserScriptSets don't need to know this detail.
- const std::set<std::string>* effective_extensions = &changed_extensions;
- std::set<std::string> all_extensions;
- if (changed_extensions.empty()) {
- all_extensions = extensions_->GetIDs();
- effective_extensions = &all_extensions;
- }
-
- if (scripts->UpdateUserScripts(shared_memory, *effective_extensions)) {
+ if (scripts->OnUpdateUserScripts(shared_memory, changed_extensions)) {
FOR_EACH_OBSERVER(
Observer,
observers_,
- OnUserScriptsUpdated(*effective_extensions, scripts->scripts()));
+ OnUserScriptsUpdated(changed_extensions, scripts->scripts()));
}
}

Powered by Google App Engine
This is Rietveld 408576698