| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file defines a service that collects information about the user | 5 // This file defines a service that collects information about the user |
| 6 // experience in order to help improve future versions of the app. | 6 // experience in order to help improve future versions of the app. |
| 7 | 7 |
| 8 #ifndef COMPONENTS_METRICS_METRICS_SERVICE_H_ | 8 #ifndef COMPONENTS_METRICS_METRICS_SERVICE_H_ |
| 9 #define COMPONENTS_METRICS_METRICS_SERVICE_H_ | 9 #define COMPONENTS_METRICS_METRICS_SERVICE_H_ |
| 10 | 10 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // Calling Start() automatically enables reporting, but sending is | 127 // Calling Start() automatically enables reporting, but sending is |
| 128 // asyncronous so this can be called immediately after Start() to prevent | 128 // asyncronous so this can be called immediately after Start() to prevent |
| 129 // any uploading. | 129 // any uploading. |
| 130 void EnableReporting(); | 130 void EnableReporting(); |
| 131 void DisableReporting(); | 131 void DisableReporting(); |
| 132 | 132 |
| 133 // Returns the client ID for this client, or the empty string if metrics | 133 // Returns the client ID for this client, or the empty string if metrics |
| 134 // recording is not currently running. | 134 // recording is not currently running. |
| 135 std::string GetClientId(); | 135 std::string GetClientId(); |
| 136 | 136 |
| 137 // Returns the install date of the application, in seconds since the epoch. |
| 138 int64 GetInstallDate(); |
| 139 |
| 137 // Returns the preferred entropy provider used to seed persistent activities | 140 // Returns the preferred entropy provider used to seed persistent activities |
| 138 // based on whether or not metrics reporting will be permitted on this client. | 141 // based on whether or not metrics reporting will be permitted on this client. |
| 139 // | 142 // |
| 140 // If metrics reporting is enabled, this method returns an entropy provider | 143 // If metrics reporting is enabled, this method returns an entropy provider |
| 141 // that has a high source of entropy, partially based on the client ID. | 144 // that has a high source of entropy, partially based on the client ID. |
| 142 // Otherwise, it returns an entropy provider that is based on a low entropy | 145 // Otherwise, it returns an entropy provider that is based on a low entropy |
| 143 // source. | 146 // source. |
| 144 scoped_ptr<const base::FieldTrial::EntropyProvider> CreateEntropyProvider(); | 147 scoped_ptr<const base::FieldTrial::EntropyProvider> CreateEntropyProvider(); |
| 145 | 148 |
| 146 // At startup, prefs needs to be called with a list of all the pref names and | 149 // At startup, prefs needs to be called with a list of all the pref names and |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, IsPluginProcess); | 462 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, IsPluginProcess); |
| 460 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, MetricsServiceObserver); | 463 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, MetricsServiceObserver); |
| 461 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, | 464 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, |
| 462 PermutedEntropyCacheClearedWhenLowEntropyReset); | 465 PermutedEntropyCacheClearedWhenLowEntropyReset); |
| 463 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); | 466 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); |
| 464 | 467 |
| 465 DISALLOW_COPY_AND_ASSIGN(MetricsService); | 468 DISALLOW_COPY_AND_ASSIGN(MetricsService); |
| 466 }; | 469 }; |
| 467 | 470 |
| 468 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ | 471 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ |
| OLD | NEW |