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

Unified Diff: components/rappor/rappor_service.h

Issue 188103004: C++ Readability review for holte (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix struct/class declaration Created 6 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 | « components/rappor/rappor_metric_unittest.cc ('k') | components/rappor/rappor_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « components/rappor/rappor_metric_unittest.cc ('k') | components/rappor/rappor_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698