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

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

Issue 11946028: Record event activity to the extension activity log. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rename ActivityLog::IsLoggingEnabled Created 7 years, 11 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 | « chrome/browser/extensions/api_actions.cc ('k') | chrome/browser/extensions/event_router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/event_router.h
diff --git a/chrome/browser/extensions/event_router.h b/chrome/browser/extensions/event_router.h
index 9df75ea05a77b19e9bd58743ce7177d2aeef4a87..a7e76b0e813c9f934a9b61abcd436f27580044ae 100644
--- a/chrome/browser/extensions/event_router.h
+++ b/chrome/browser/extensions/event_router.h
@@ -31,6 +31,7 @@ class RenderProcessHost;
}
namespace extensions {
+class ActivityLog;
class Extension;
class ExtensionHost;
class ExtensionPrefs;
@@ -62,6 +63,7 @@ class EventRouter : public content::NotificationObserver,
// Sends an event via ipc_sender to the given extension. Can be called on any
// thread.
static void DispatchEvent(IPC::Sender* ipc_sender,
+ void* profile_id,
const std::string& extension_id,
const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
@@ -149,9 +151,17 @@ class EventRouter : public content::NotificationObserver,
typedef std::pair<const content::BrowserContext*, std::string>
EventDispatchIdentifier;
+ // Records an event notification in the extension activity log. Can be
+ // called from any thread.
+ static void LogExtensionEventMessage(void* profile_id,
+ const std::string& extension_id,
+ const std::string& event_name,
+ scoped_ptr<ListValue> event_args);
+
// TODO(gdk): Document this.
static void DispatchExtensionMessage(
IPC::Sender* ipc_sender,
+ void* profile_id,
const std::string& extension_id,
const std::string& event_name,
base::ListValue* event_args,
@@ -226,6 +236,8 @@ class EventRouter : public content::NotificationObserver,
typedef base::hash_map<std::string, Observer*> ObserverMap;
ObserverMap observers_;
+ ActivityLog* activity_log_;
+
// True if we should dispatch the event signalling that Chrome was updated
// upon loading an extension.
bool dispatch_chrome_updated_event_;
« no previous file with comments | « chrome/browser/extensions/api_actions.cc ('k') | chrome/browser/extensions/event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698