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

Unified Diff: content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc

Issue 141523010: Pepper: Log in UMA when an interface is used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased again Created 6 years, 10 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 | « content/browser/renderer_host/pepper/browser_ppapi_host_impl.h ('k') | ppapi/PRESUBMIT.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
diff --git a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
index e4b3b7693117f9b9acffc25c241d66eec8eefebd..94ddd54d7b3517904d177968ee38ba7c5511b7e0 100644
--- a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
+++ b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
@@ -4,6 +4,7 @@
#include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
+#include "base/metrics/sparse_histogram.h"
#include "content/browser/renderer_host/pepper/pepper_message_filter.h"
#include "content/browser/tracing/trace_message_filter.h"
#include "content/common/pepper_renderer_instance_data.h"
@@ -164,6 +165,8 @@ bool BrowserPpapiHostImpl::HostMessageFilter::OnMessageReceived(
IPC_BEGIN_MESSAGE_MAP(BrowserPpapiHostImpl::HostMessageFilter, msg)
// Add necessary message handlers here.
IPC_MESSAGE_HANDLER(PpapiHostMsg_Keepalive, OnKeepalive)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_LogInterfaceUsage,
+ OnHostMsgLogInterfaceUsage)
IPC_MESSAGE_UNHANDLED(handled = ppapi_host_->OnMessageReceived(msg))
IPC_END_MESSAGE_MAP();
return handled;
@@ -183,6 +186,11 @@ void BrowserPpapiHostImpl::HostMessageFilter::OnKeepalive() {
browser_ppapi_host_impl_->OnKeepalive();
}
+void BrowserPpapiHostImpl::HostMessageFilter::OnHostMsgLogInterfaceUsage(
+ int hash) const {
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Pepper.InterfaceUsed", hash);
+}
+
void BrowserPpapiHostImpl::OnKeepalive() {
// An instance has been active. The on_keepalive_callback_ will be
// used to permit the content embedder to handle this, e.g. by tracking
« no previous file with comments | « content/browser/renderer_host/pepper/browser_ppapi_host_impl.h ('k') | ppapi/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698