Index: chrome/browser/renderer_host/chrome_render_message_filter.cc |
diff --git a/chrome/browser/renderer_host/chrome_render_message_filter.cc b/chrome/browser/renderer_host/chrome_render_message_filter.cc |
index 0fbb8b021370f8b7fe92a3c4f9e395d193f85a32..432439621b3305b9bcf84ceac6f6673799cbdb85 100644 |
--- a/chrome/browser/renderer_host/chrome_render_message_filter.cc |
+++ b/chrome/browser/renderer_host/chrome_render_message_filter.cc |
@@ -59,6 +59,7 @@ namespace { |
void AddAPIActionToExtensionActivityLog( |
Profile* profile, |
+ const std::string& call_type, |
const extensions::Extension* extension, |
const std::string& api_call, |
scoped_ptr<ListValue> args, |
@@ -70,6 +71,7 @@ void AddAPIActionToExtensionActivityLog( |
FROM_HERE, |
base::Bind(&AddAPIActionToExtensionActivityLog, |
profile, |
+ call_type, |
extension, |
api_call, |
base::Passed(&args), |
@@ -77,8 +79,12 @@ void AddAPIActionToExtensionActivityLog( |
} else { |
extensions::ActivityLog* activity_log = |
extensions::ActivityLog::GetInstance(profile); |
- if (activity_log && activity_log->IsLogEnabled()) |
- activity_log->LogAPIAction(extension, api_call, args.get(), extra); |
+ if (activity_log && activity_log->IsLogEnabled()) { |
+ if (call_type == "API") |
palmer
2013/04/10 23:52:48
Hmm, how open-ended are these call types? Maybe an
|
+ activity_log->LogAPIAction(extension, api_call, args.get(), extra); |
+ else if (call_type == "EVENT") |
+ activity_log->LogEventAction(extension, api_call, args.get(), extra); |
+ } |
} |
} |
@@ -590,6 +596,7 @@ void ChromeRenderMessageFilter::OnExtensionResumeRequests(int route_id) { |
} |
void ChromeRenderMessageFilter::OnAddAPIActionToExtensionActivityLog( |
+ const std::string& call_type, |
const std::string& extension_id, |
const ExtensionHostMsg_APIAction_Params& params) { |
const extensions::Extension* extension = |
@@ -597,7 +604,7 @@ void ChromeRenderMessageFilter::OnAddAPIActionToExtensionActivityLog( |
scoped_ptr<ListValue> args(params.arguments.DeepCopy()); |
// The activity is recorded as an API action in the extension |
// activity log. |
- AddAPIActionToExtensionActivityLog(profile_, extension, |
+ AddAPIActionToExtensionActivityLog(profile_, call_type, extension, |
params.api_call, args.Pass(), |
params.extra); |
} |