Commit d7cdbb34 authored by miguelg's avatar miguelg Committed by Commit bot

Add rappor metrics for messages received

BUG=466091

Review URL: https://codereview.chromium.org/1017183002

Cr-Commit-Position: refs/heads/master@{#321559}
parent 60d4e948
......@@ -34,6 +34,7 @@
#include "components/content_settings/core/common/permission_request_id.h"
#include "components/gcm_driver/gcm_driver.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/rappor/rappor_utils.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
......@@ -200,6 +201,11 @@ void PushMessagingServiceImpl::OnMessage(
return;
}
rappor::SampleDomainAndRegistryFromGURL(
g_browser_process->rappor_service(),
"PushMessaging.MessageReceived.Origin",
application_id.origin());
// The Push API only exposes a single string of data in the push event fired
// on the Service Worker. When developers send messages using GCM to the Push
// API and want to include a message payload, they must pass a single key-
......
......@@ -173,6 +173,13 @@ components/rappor/rappor_service.cc.
</summary>
</rappor-metric>
<rappor-metric name="PushMessaging.MessageReceived.Origin" type="ETLD_PLUS_ONE">
<owner>miguelg@chromium.org</owner>
<summary>
Push Messages received per Origin.
</summary>
</rappor-metric>
<rappor-metric name="Search.DefaultSearchProvider" type="ETLD_PLUS_ONE">
<owner>holte@chromium.org</owner>
<summary>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment