Chromium Code Reviews| 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)); |