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

Unified Diff: components/rappor/rappor_service.h

Issue 1014543003: Add an IPC method for Blink to call RapporService::RecordSample() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
Index: components/rappor/rappor_service.h
diff --git a/components/rappor/rappor_service.h b/components/rappor/rappor_service.h
index d50b91e9ca2edda4878a7314e5344b94e16e6c7d..b4fb029f377ec51379a84eaab2ff7cbcb1297cae 100644
--- a/components/rappor/rappor_service.h
+++ b/components/rappor/rappor_service.h
@@ -12,6 +12,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "base/metrics/user_metrics.h"
#include "base/timer/timer.h"
#include "components/metrics/daily_event.h"
#include "components/rappor/rappor_parameters.h"
@@ -108,6 +109,11 @@ class RapporService {
// reports and pass it to the uploader.
void OnLogInterval();
+ void EnableRecordFromUserMetrics();
+ void OnUserMetricsCallback(
+ const std::string& metric,
+ const std::string& sample);
+
// Finds a metric in the metrics_map_, creating it if it doesn't already
// exist.
RapporMetric* LookUpMetric(const std::string& metric_name,
@@ -141,6 +147,8 @@ class RapporService {
// The map owns the metrics it contains.
std::map<std::string, RapporMetric*> metrics_map_;
+ base::RapporCallback user_metrics_callback_;
+
DISALLOW_COPY_AND_ASSIGN(RapporService);
};

Powered by Google App Engine
This is Rietveld 408576698