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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 // stored as a string. | 364 // stored as a string. |
365 void IncrementLongPrefsValue(const char* path); | 365 void IncrementLongPrefsValue(const char* path); |
366 | 366 |
367 // Records that the browser was shut down cleanly. | 367 // Records that the browser was shut down cleanly. |
368 void LogCleanShutdown(); | 368 void LogCleanShutdown(); |
369 | 369 |
370 // Records state that should be periodically saved, like uptime and | 370 // Records state that should be periodically saved, like uptime and |
371 // buffered plugin stability statistics. | 371 // buffered plugin stability statistics. |
372 void RecordCurrentState(PrefService* pref); | 372 void RecordCurrentState(PrefService* pref); |
373 | 373 |
374 // Checks whether events should currently be logged. | |
375 bool ShouldLogEvents(); | |
376 | |
377 // Sets the value of the specified path in prefs and schedules a save. | 374 // Sets the value of the specified path in prefs and schedules a save. |
378 void RecordBooleanPrefValue(const char* path, bool value); | 375 void RecordBooleanPrefValue(const char* path, bool value); |
379 | 376 |
380 // Notifies observers on a synthetic trial list change. | 377 // Notifies observers on a synthetic trial list change. |
381 void NotifySyntheticTrialObservers(); | 378 void NotifySyntheticTrialObservers(); |
382 | 379 |
383 // Returns a list of synthetic field trials that are older than |time|. | 380 // Returns a list of synthetic field trials that are older than |time|. |
384 void GetSyntheticFieldTrialsOlderThan( | 381 void GetSyntheticFieldTrialsOlderThan( |
385 base::TimeTicks time, | 382 base::TimeTicks time, |
386 std::vector<variations::ActiveGroupId>* synthetic_trials); | 383 std::vector<variations::ActiveGroupId>* synthetic_trials); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 // Weak pointers factory used for saving state. All weak pointers managed by | 495 // Weak pointers factory used for saving state. All weak pointers managed by |
499 // this factory are invalidated in ScheduleNextStateSave. | 496 // this factory are invalidated in ScheduleNextStateSave. |
500 base::WeakPtrFactory<MetricsService> state_saver_factory_; | 497 base::WeakPtrFactory<MetricsService> state_saver_factory_; |
501 | 498 |
502 DISALLOW_COPY_AND_ASSIGN(MetricsService); | 499 DISALLOW_COPY_AND_ASSIGN(MetricsService); |
503 }; | 500 }; |
504 | 501 |
505 } // namespace metrics | 502 } // namespace metrics |
506 | 503 |
507 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ | 504 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ |
OLD | NEW |