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

Side by Side Diff: chrome/browser/extensions/event_router.cc

Issue 23729005: Enable Activity Logging by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added definition of 'active' Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/event_router.h" 5 #include "chrome/browser/extensions/event_router.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 // static 119 // static
120 void EventRouter::DispatchExtensionMessage(IPC::Sender* ipc_sender, 120 void EventRouter::DispatchExtensionMessage(IPC::Sender* ipc_sender,
121 void* profile_id, 121 void* profile_id,
122 const std::string& extension_id, 122 const std::string& extension_id,
123 const std::string& event_name, 123 const std::string& event_name,
124 ListValue* event_args, 124 ListValue* event_args,
125 UserGestureState user_gesture, 125 UserGestureState user_gesture,
126 const EventFilteringInfo& info) { 126 const EventFilteringInfo& info) {
127 if (ActivityLog::IsLogEnabledOnAnyProfile()) { 127 LogExtensionEventMessage(profile_id, extension_id, event_name,
128 LogExtensionEventMessage(profile_id, extension_id, event_name, 128 scoped_ptr<ListValue>(event_args->DeepCopy()));
129 scoped_ptr<ListValue>(event_args->DeepCopy()));
130 }
131 129
132 ListValue args; 130 ListValue args;
133 args.Set(0, new base::StringValue(event_name)); 131 args.Set(0, new base::StringValue(event_name));
134 args.Set(1, event_args); 132 args.Set(1, event_args);
135 args.Set(2, info.AsValue().release()); 133 args.Set(2, info.AsValue().release());
136 ipc_sender->Send(new ExtensionMsg_MessageInvoke( 134 ipc_sender->Send(new ExtensionMsg_MessageInvoke(
137 MSG_ROUTING_CONTROL, 135 MSG_ROUTING_CONTROL,
138 extension_id, 136 extension_id,
139 "event_bindings", 137 "event_bindings",
140 "dispatchEvent", 138 "dispatchEvent",
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 copy->will_dispatch_callback = will_dispatch_callback; 859 copy->will_dispatch_callback = will_dispatch_callback;
862 return copy; 860 return copy;
863 } 861 }
864 862
865 EventListenerInfo::EventListenerInfo(const std::string& event_name, 863 EventListenerInfo::EventListenerInfo(const std::string& event_name,
866 const std::string& extension_id) 864 const std::string& extension_id)
867 : event_name(event_name), 865 : event_name(event_name),
868 extension_id(extension_id) {} 866 extension_id(extension_id) {}
869 867
870 } // namespace extensions 868 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698