From 1ef13cf522915b73185907981d10802f1e45fdb5 Mon Sep 17 00:00:00 2001 From: "elijahtaylor@chromium.org" Date: Fri, 21 Mar 2014 22:44:01 +0000 Subject: Add IsCrashReportingEnabled call to Pepper UMA API This mirrors the existing metricsPrivate JS API. BUG=341130 Review URL: https://codereview.chromium.org/195793026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258702 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/proxy/uma_private_resource.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'ppapi/proxy/uma_private_resource.cc') diff --git a/ppapi/proxy/uma_private_resource.cc b/ppapi/proxy/uma_private_resource.cc index d17a005..2932e6c 100644 --- a/ppapi/proxy/uma_private_resource.cc +++ b/ppapi/proxy/uma_private_resource.cc @@ -84,6 +84,27 @@ void UMAPrivateResource::HistogramEnumeration( boundary_value)); } +int32_t UMAPrivateResource::IsCrashReportingEnabled( + PP_Instance instance, + scoped_refptr callback) { + if (pending_callback_ != NULL) + return PP_ERROR_INPROGRESS; + pending_callback_ = callback; + Call( + RENDERER, + PpapiHostMsg_UMA_IsCrashReportingEnabled(), + base::Bind(&UMAPrivateResource::OnPluginMsgIsCrashReportingEnabled, + this)); + return PP_OK_COMPLETIONPENDING; +} + +void UMAPrivateResource::OnPluginMsgIsCrashReportingEnabled( + const ResourceMessageReplyParams& params) { + if (TrackedCallback::IsPending(pending_callback_)) + pending_callback_->Run(params.result()); + pending_callback_ = NULL; +} + } // namespace proxy } // namespace ppapi -- cgit v1.1