| 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 // Prepares the initial metrics log, which includes startup histograms and | 325 // Prepares the initial metrics log, which includes startup histograms and |
| 326 // profiler data, as well as incremental stability-related metrics. | 326 // profiler data, as well as incremental stability-related metrics. |
| 327 void PrepareInitialMetricsLog(); | 327 void PrepareInitialMetricsLog(); |
| 328 | 328 |
| 329 // Uploads the currently staged log (which must be non-null). | 329 // Uploads the currently staged log (which must be non-null). |
| 330 void SendStagedLog(); | 330 void SendStagedLog(); |
| 331 | 331 |
| 332 // Called after transmission completes (either successfully or with failure). | 332 // Called after transmission completes (either successfully or with failure). |
| 333 void OnLogUploadComplete(int response_code); | 333 void OnLogUploadComplete(int response_code); |
| 334 | 334 |
| 335 // Reads, increments and then sets the specified integer preference. | |
| 336 void IncrementPrefValue(const char* path); | |
| 337 | |
| 338 // Reads, increments and then sets the specified long preference that is | 335 // Reads, increments and then sets the specified long preference that is |
| 339 // stored as a string. | 336 // stored as a string. |
| 340 void IncrementLongPrefsValue(const char* path); | 337 void IncrementLongPrefsValue(const char* path); |
| 341 | 338 |
| 342 // Records that the browser was shut down cleanly. | 339 // Records that the browser was shut down cleanly. |
| 343 void LogCleanShutdown(bool end_completed); | 340 void LogCleanShutdown(bool end_completed); |
| 344 | 341 |
| 345 // Notifies observers on a synthetic trial list change. | 342 // Notifies observers on a synthetic trial list change. |
| 346 void NotifySyntheticTrialObservers(); | 343 void NotifySyntheticTrialObservers(); |
| 347 | 344 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 // Weak pointers factory used to post task on different threads. All weak | 456 // Weak pointers factory used to post task on different threads. All weak |
| 460 // pointers managed by this factory have the same lifetime as MetricsService. | 457 // pointers managed by this factory have the same lifetime as MetricsService. |
| 461 base::WeakPtrFactory<MetricsService> self_ptr_factory_; | 458 base::WeakPtrFactory<MetricsService> self_ptr_factory_; |
| 462 | 459 |
| 463 DISALLOW_COPY_AND_ASSIGN(MetricsService); | 460 DISALLOW_COPY_AND_ASSIGN(MetricsService); |
| 464 }; | 461 }; |
| 465 | 462 |
| 466 } // namespace metrics | 463 } // namespace metrics |
| 467 | 464 |
| 468 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ | 465 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ |
| OLD | NEW |