| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 // were created after the trial is registered. Only one group name may be | 273 // were created after the trial is registered. Only one group name may be |
| 274 // registered at a time for a given trial_name. Only the last group name that | 274 // registered at a time for a given trial_name. Only the last group name that |
| 275 // is registered for a given trial name will be recorded. The values passed | 275 // is registered for a given trial name will be recorded. The values passed |
| 276 // in must not correspond to any real field trial in the code. | 276 // in must not correspond to any real field trial in the code. |
| 277 // To use this method, SyntheticTrialGroup should friend your class. | 277 // To use this method, SyntheticTrialGroup should friend your class. |
| 278 void RegisterSyntheticFieldTrial(const SyntheticTrialGroup& trial_group); | 278 void RegisterSyntheticFieldTrial(const SyntheticTrialGroup& trial_group); |
| 279 | 279 |
| 280 // Check if this install was cloned or imaged from another machine. If a | 280 // Check if this install was cloned or imaged from another machine. If a |
| 281 // clone is detected, reset the client id and low entropy source. This | 281 // clone is detected, reset the client id and low entropy source. This |
| 282 // should not be called more than once. | 282 // should not be called more than once. |
| 283 void CheckForClonedInstall(); | 283 void CheckForClonedInstall( |
| 284 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
| 284 | 285 |
| 285 private: | 286 private: |
| 286 // The MetricsService has a lifecycle that is stored as a state. | 287 // The MetricsService has a lifecycle that is stored as a state. |
| 287 // See metrics_service.cc for description of this lifecycle. | 288 // See metrics_service.cc for description of this lifecycle. |
| 288 enum State { | 289 enum State { |
| 289 INITIALIZED, // Constructor was called. | 290 INITIALIZED, // Constructor was called. |
| 290 INIT_TASK_SCHEDULED, // Waiting for deferred init tasks to | 291 INIT_TASK_SCHEDULED, // Waiting for deferred init tasks to |
| 291 // complete. | 292 // complete. |
| 292 INIT_TASK_DONE, // Waiting for timer to send initial log. | 293 INIT_TASK_DONE, // Waiting for timer to send initial log. |
| 293 SENDING_INITIAL_STABILITY_LOG, // Initial stability log being sent. | 294 SENDING_INITIAL_STABILITY_LOG, // Initial stability log being sent. |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 | 631 |
| 631 // Registers/unregisters |observer| to receive MetricsLog notifications | 632 // Registers/unregisters |observer| to receive MetricsLog notifications |
| 632 // from metrics service. | 633 // from metrics service. |
| 633 static void AddMetricsServiceObserver(MetricsServiceObserver* observer); | 634 static void AddMetricsServiceObserver(MetricsServiceObserver* observer); |
| 634 static void RemoveMetricsServiceObserver(MetricsServiceObserver* observer); | 635 static void RemoveMetricsServiceObserver(MetricsServiceObserver* observer); |
| 635 | 636 |
| 636 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); | 637 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); |
| 637 }; | 638 }; |
| 638 | 639 |
| 639 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 640 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| OLD | NEW |