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

Unified Diff: extensions/renderer/user_script_set_manager.cc

Issue 1140173003: Allow whitelisted content scripts to be injected in WebViews. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@document_has_focus
Patch Set: Remove some no-longer-needed WebViewGuestDelegate interfaces Created 5 years, 7 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 5a317a14d61f59ef8461bfa7f37f6f42d76c4bf0..1c8f72d47c1fe1b8061b40e1b7a53511dd927588 100644
--- a/extensions/renderer/user_script_set_manager.cc
+++ b/extensions/renderer/user_script_set_manager.cc
@@ -96,7 +96,8 @@ UserScriptSet* UserScriptSetManager::GetProgrammaticScriptsByHostID(
void UserScriptSetManager::OnUpdateUserScripts(
base::SharedMemoryHandle shared_memory,
const HostID& host_id,
- const std::set<HostID>& changed_hosts) {
+ const std::set<HostID>& changed_hosts,
+ bool whitelisted_only) {
if (!base::SharedMemory::IsHandleValid(shared_memory)) {
NOTREACHED() << "Bad scripts handle";
return;
@@ -147,7 +148,9 @@ void UserScriptSetManager::OnUpdateUserScripts(
effective_hosts = &all_hosts;
}
- if (scripts->UpdateUserScripts(shared_memory, *effective_hosts)) {
+ if (scripts->UpdateUserScripts(shared_memory,
+ *effective_hosts,
+ whitelisted_only)) {
FOR_EACH_OBSERVER(
Observer,
observers_,
« extensions/renderer/user_script_set.cc ('K') | « 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