user_metrics_recorder_test_api.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2015 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_METRICS_USER_METRICS_RECORDER_TEST_API_H_
  5. #define ASH_METRICS_USER_METRICS_RECORDER_TEST_API_H_
  6. #include "ash/metrics/user_metrics_recorder.h"
  7. namespace ash {
  8. // Test API to access internals of the UserMetricsRecorder class.
  9. class UserMetricsRecorderTestAPI {
  10. public:
  11. UserMetricsRecorderTestAPI();
  12. UserMetricsRecorderTestAPI(const UserMetricsRecorderTestAPI&) = delete;
  13. UserMetricsRecorderTestAPI& operator=(const UserMetricsRecorderTestAPI&) =
  14. delete;
  15. ~UserMetricsRecorderTestAPI();
  16. // Accessor to UserMetricsRecorder::RecordPeriodicMetrics().
  17. void RecordPeriodicMetrics();
  18. // Accessor to UserMetricsRecorder::IsUserInActiveDesktopEnvironment().
  19. bool IsUserInActiveDesktopEnvironment() const;
  20. private:
  21. // The UserMetricsRecorder that |this| is providing internal access to.
  22. UserMetricsRecorder user_metrics_recorder_;
  23. };
  24. } // namespace ash
  25. #endif // ASH_METRICS_USER_METRICS_RECORDER_TEST_API_H_