Index: components/rappor/rappor_service.h |
diff --git a/components/rappor/rappor_service.h b/components/rappor/rappor_service.h |
index 9e2cd9b1e4918fc7622bff7644ea5612562320a8..323e9ba520d538d6a473a3cd07f7bee21c530787 100644 |
--- a/components/rappor/rappor_service.h |
+++ b/components/rappor/rappor_service.h |
@@ -5,22 +5,31 @@ |
#ifndef COMPONENTS_RAPPOR_RAPPOR_SERVICE_H_ |
#define COMPONENTS_RAPPOR_RAPPOR_SERVICE_H_ |
+#include <map> |
#include <string> |
#include "base/basictypes.h" |
-#include "base/prefs/pref_service.h" |
-#include "base/time/time.h" |
+#include "base/macros.h" |
+#include "base/memory/scoped_ptr.h" |
#include "base/timer/timer.h" |
-#include "components/rappor/log_uploader.h" |
-#include "components/rappor/proto/rappor_metric.pb.h" |
-#include "components/rappor/rappor_metric.h" |
class PrefRegistrySimple; |
+class PrefService; |
+ |
+namespace net { |
+class URLRequestContextGetter; |
+} |
namespace rappor { |
+class LogUploader; |
+class RapporMetric; |
+class RapporReports; |
+struct RapporParameters; |
+ |
// The type of data stored in a metric. |
enum RapporType { |
+ // For sampling the eTLD+1 of a URL. |
ETLD_PLUS_ONE_RAPPOR_TYPE = 0, |
NUM_RAPPOR_TYPES |
}; |
@@ -52,8 +61,9 @@ class RapporService { |
static void RegisterPrefs(PrefRegistrySimple* registry); |
protected: |
- // Logs all of the collected metrics to the reports proto message. Exposed |
- // for tests. Returns true if any metrics were recorded. |
+ // Logs all of the collected metrics to the reports proto message and clears |
+ // the internal map. Exposed for tests. Returns true if any metrics were |
+ // recorded. |
bool ExportMetrics(RapporReports* reports); |
// Records a sample of the rappor metric specified by |parameters|. |
@@ -91,7 +101,7 @@ class RapporService { |
// The cohort this client is assigned to. -1 is uninitialized. |
int32_t cohort_; |
- // Timer which schedules calls to OnLogInterval() |
+ // Timer which schedules calls to OnLogInterval(). |
base::OneShotTimer<RapporService> log_rotation_timer_; |
// A private LogUploader instance for sending reports to the server. |