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

Unified Diff: chrome/browser/push_messaging/push_messaging_service_impl.cc

Issue 1017183002: Add rappor metrics for messages received (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@raport
Patch Set: Created 5 years, 9 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 | « no previous file | tools/metrics/rappor/rappor.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/push_messaging/push_messaging_service_impl.cc
diff --git a/chrome/browser/push_messaging/push_messaging_service_impl.cc b/chrome/browser/push_messaging/push_messaging_service_impl.cc
index ba3e2da1db3a0e836d942101fc94adf59996b690..251e85a38a633f15b1ee0ee62699196e0c8a8b7d 100644
--- a/chrome/browser/push_messaging/push_messaging_service_impl.cc
+++ b/chrome/browser/push_messaging/push_messaging_service_impl.cc
@@ -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-
« no previous file with comments | « no previous file | tools/metrics/rappor/rappor.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698