| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 8 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| 9 #define CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 9 #define CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| 10 | 10 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 // is registered for a given trial name will be recorded. The values passed | 286 // is registered for a given trial name will be recorded. The values passed |
| 287 // in must not correspond to any real field trial in the code. | 287 // in must not correspond to any real field trial in the code. |
| 288 // To use this method, SyntheticTrialGroup should friend your class. | 288 // To use this method, SyntheticTrialGroup should friend your class. |
| 289 void RegisterSyntheticFieldTrial(const SyntheticTrialGroup& trial_group); | 289 void RegisterSyntheticFieldTrial(const SyntheticTrialGroup& trial_group); |
| 290 | 290 |
| 291 // Check if this install was cloned or imaged from another machine. If a | 291 // Check if this install was cloned or imaged from another machine. If a |
| 292 // clone is detected, reset the client id and low entropy source. This | 292 // clone is detected, reset the client id and low entropy source. This |
| 293 // should not be called more than once. | 293 // should not be called more than once. |
| 294 void CheckForClonedInstall(); | 294 void CheckForClonedInstall(); |
| 295 | 295 |
| 296 void ResetVariationsState(); |
| 297 |
| 296 private: | 298 private: |
| 297 // The MetricsService has a lifecycle that is stored as a state. | 299 // The MetricsService has a lifecycle that is stored as a state. |
| 298 // See metrics_service.cc for description of this lifecycle. | 300 // See metrics_service.cc for description of this lifecycle. |
| 299 enum State { | 301 enum State { |
| 300 INITIALIZED, // Constructor was called. | 302 INITIALIZED, // Constructor was called. |
| 301 INIT_TASK_SCHEDULED, // Waiting for deferred init tasks to | 303 INIT_TASK_SCHEDULED, // Waiting for deferred init tasks to |
| 302 // complete. | 304 // complete. |
| 303 INIT_TASK_DONE, // Waiting for timer to send initial log. | 305 INIT_TASK_DONE, // Waiting for timer to send initial log. |
| 304 SENDING_INITIAL_STABILITY_LOG, // Initial stability log being sent. | 306 SENDING_INITIAL_STABILITY_LOG, // Initial stability log being sent. |
| 305 SENDING_INITIAL_METRICS_LOG, // Initial metrics log being sent. | 307 SENDING_INITIAL_METRICS_LOG, // Initial metrics log being sent. |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 | 670 |
| 669 // Returns true if crash reporting is enabled. This is set at the platform | 671 // Returns true if crash reporting is enabled. This is set at the platform |
| 670 // level for Android and ChromeOS, and otherwise is the same as | 672 // level for Android and ChromeOS, and otherwise is the same as |
| 671 // IsMetricsReportingEnabled for desktop Chrome. | 673 // IsMetricsReportingEnabled for desktop Chrome. |
| 672 static bool IsCrashReportingEnabled(); | 674 static bool IsCrashReportingEnabled(); |
| 673 | 675 |
| 674 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); | 676 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); |
| 675 }; | 677 }; |
| 676 | 678 |
| 677 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 679 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| OLD | NEW |