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

Side by Side 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: nits Created 7 years, 4 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 if (ActivityLog::MaybeLogEnabled()) {
128 LogExtensionEventMessage(profile_id, extension_id, event_name, 128 LogExtensionEventMessage(profile_id, extension_id, event_name,
129 scoped_ptr<ListValue>(event_args->DeepCopy())); 129 scoped_ptr<ListValue>(event_args->DeepCopy()));
130 } 130 }
131 131
132 ListValue args; 132 ListValue args;
133 args.Set(0, Value::CreateStringValue(event_name)); 133 args.Set(0, Value::CreateStringValue(event_name));
134 args.Set(1, event_args); 134 args.Set(1, event_args);
135 args.Set(2, info.AsValue().release()); 135 args.Set(2, info.AsValue().release());
136 ipc_sender->Send(new ExtensionMsg_MessageInvoke( 136 ipc_sender->Send(new ExtensionMsg_MessageInvoke(
137 MSG_ROUTING_CONTROL, 137 MSG_ROUTING_CONTROL,
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 copy->will_dispatch_callback = will_dispatch_callback; 861 copy->will_dispatch_callback = will_dispatch_callback;
862 return copy; 862 return copy;
863 } 863 }
864 864
865 EventListenerInfo::EventListenerInfo(const std::string& event_name, 865 EventListenerInfo::EventListenerInfo(const std::string& event_name,
866 const std::string& extension_id) 866 const std::string& extension_id)
867 : event_name(event_name), 867 : event_name(event_name),
868 extension_id(extension_id) {} 868 extension_id(extension_id) {}
869 869
870 } // namespace extensions 870 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698