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

Unified Diff: chrome/browser/extensions/event_router.cc

Issue 18430004: Sets correct ActivityLog enabled status to the first renderer process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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: chrome/browser/extensions/event_router.cc
diff --git a/chrome/browser/extensions/event_router.cc b/chrome/browser/extensions/event_router.cc
index 4ef7a024f11be32e00d38de23d48892feb7fe4ed..00491503cea7d0d0af07725f82aefa383bdee743 100644
--- a/chrome/browser/extensions/event_router.cc
+++ b/chrome/browser/extensions/event_router.cc
@@ -109,7 +109,9 @@ void EventRouter::LogExtensionEventMessage(void* profile_id,
Profile* profile = reinterpret_cast<Profile*>(profile_id);
if (!g_browser_process->profile_manager()->IsValidProfile(profile))
return;
- ActivityLog::GetInstance(profile)->LogEventAction(
+ ActivityLog* activity_log = ActivityLog::GetInstance(profile);
+ if (!activity_log->IsLogEnabled()) return;
+ activity_log->LogEventAction(
extension_id, event_name, event_args.get(), std::string());
}
}
@@ -122,10 +124,8 @@ void EventRouter::DispatchExtensionMessage(IPC::Sender* ipc_sender,
ListValue* event_args,
UserGestureState user_gesture,
const EventFilteringInfo& info) {
- if (ActivityLog::IsLogEnabledOnAnyProfile()) {
felt 2013/07/23 06:37:34 Something I forgot about until now, and you should
pmarch 2013/07/29 17:36:47 Here, we need to check for command line switch and
- LogExtensionEventMessage(profile_id, extension_id, event_name,
- scoped_ptr<ListValue>(event_args->DeepCopy()));
- }
+ LogExtensionEventMessage(profile_id, extension_id, event_name,
+ scoped_ptr<ListValue>(event_args->DeepCopy()));
ListValue args;
args.Set(0, Value::CreateStringValue(event_name));

Powered by Google App Engine
This is Rietveld 408576698