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

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..0f999049e916587ae7d3e4697aac352b52783613 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"
@@ -47,6 +48,7 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/l10n/l10n_util.h"
+
johnme 2015/03/18 18:40:39 Nit: no double newline
Miguel Garcia 2015/03/18 18:51:27 Done.
#if defined(OS_ANDROID)
#include "chrome/browser/ui/android/tab_model/tab_model.h"
#include "chrome/browser/ui/android/tab_model/tab_model_list.h"
@@ -200,6 +202,10 @@ void PushMessagingServiceImpl::OnMessage(
return;
}
+ rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(),
+ "PushMessaging.MessageReceived.Url",
johnme 2015/03/18 18:40:39 Presumably this should be .Origin to match the nam
Miguel Garcia 2015/03/18 18:51:27 indeed
+ 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