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

Unified Diff: extensions/renderer/user_script_set_manager.cc

Issue 2089333002: [Extensions] Add renderer-side logic to short circuit activity logging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Guard adding dom activity loggers Created 4 years, 6 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 23a7eb8ff1d480a3ed8f30272b0a2522c050be96..86fcc64202b5a77b145142f3ac30703bc32e0a51 100644
--- a/extensions/renderer/user_script_set_manager.cc
+++ b/extensions/renderer/user_script_set_manager.cc
@@ -15,7 +15,8 @@
namespace extensions {
-UserScriptSetManager::UserScriptSetManager() {
+UserScriptSetManager::UserScriptSetManager()
+ : activity_logging_enabled_(false) {
content::RenderThread::Get()->AddObserver(this);
}
@@ -43,11 +44,8 @@ UserScriptSetManager::GetInjectionForDeclarativeScript(
return std::unique_ptr<ScriptInjection>();
return user_script_set->GetDeclarativeScriptInjection(
- script_id,
- render_frame,
- tab_id,
- UserScript::BROWSER_DRIVEN,
- url);
+ script_id, render_frame, tab_id, UserScript::BROWSER_DRIVEN, url,
+ activity_logging_enabled_);
}
bool UserScriptSetManager::OnControlMessageReceived(
@@ -65,11 +63,13 @@ void UserScriptSetManager::GetAllInjections(
content::RenderFrame* render_frame,
int tab_id,
UserScript::RunLocation run_location) {
- static_scripts_.GetInjections(injections, render_frame, tab_id, run_location);
+ static_scripts_.GetInjections(injections, render_frame, tab_id, run_location,
+ activity_logging_enabled_);
for (UserScriptSetMap::iterator it = programmatic_scripts_.begin();
it != programmatic_scripts_.end();
++it) {
- it->second->GetInjections(injections, render_frame, tab_id, run_location);
+ it->second->GetInjections(injections, render_frame, tab_id, run_location,
+ activity_logging_enabled_);
}
}
« 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