Chromium Code Reviews| Index: components/rappor/rappor_service.h |
| diff --git a/components/rappor/rappor_service.h b/components/rappor/rappor_service.h |
| index 9e2cd9b1e4918fc7622bff7644ea5612562320a8..d4ff8d7451eb94938ec56f72e57d7d316b0d6720 100644 |
| --- a/components/rappor/rappor_service.h |
| +++ b/components/rappor/rappor_service.h |
| @@ -2,12 +2,17 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +// Change for readability |
| + |
| #ifndef COMPONENTS_RAPPOR_RAPPOR_SERVICE_H_ |
| #define COMPONENTS_RAPPOR_RAPPOR_SERVICE_H_ |
| +#include <map> |
| #include <string> |
| #include "base/basictypes.h" |
| +#include "base/macros.h" |
| +#include "base/memory/scoped_ptr.h" |
| #include "base/prefs/pref_service.h" |
| #include "base/time/time.h" |
| #include "base/timer/timer.h" |
| @@ -17,11 +22,17 @@ |
| class PrefRegistrySimple; |
| +namespace net { |
| +class URLRequestContextGetter; |
| +} |
| + |
| namespace rappor { |
| // The type of data stored in a metric. |
| enum RapporType { |
| + // For sampling the eTLD+1 of a URL. |
| ETLD_PLUS_ONE_RAPPOR_TYPE = 0, |
| + // Counter and end marker. |
|
ktl
2014/03/18 08:35:01
The first comment is good, but I think the meaning
Steven Holte
2014/03/19 23:46:55
Done.
|
| NUM_RAPPOR_TYPES |
| }; |
| @@ -52,8 +63,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 +103,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. |