1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36

ash / metrics / user_metrics_recorder_test_api.h [blame]

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_METRICS_USER_METRICS_RECORDER_TEST_API_H_
#define ASH_METRICS_USER_METRICS_RECORDER_TEST_API_H_

#include "ash/metrics/user_metrics_recorder.h"

namespace ash {

// Test API to access internals of the UserMetricsRecorder class.
class UserMetricsRecorderTestAPI {
 public:
  UserMetricsRecorderTestAPI();

  UserMetricsRecorderTestAPI(const UserMetricsRecorderTestAPI&) = delete;
  UserMetricsRecorderTestAPI& operator=(const UserMetricsRecorderTestAPI&) =
      delete;

  ~UserMetricsRecorderTestAPI();

  // Accessor to UserMetricsRecorder::RecordPeriodicMetrics().
  void RecordPeriodicMetrics();

  // Accessor to UserMetricsRecorder::IsUserInActiveDesktopEnvironment().
  bool IsUserInActiveDesktopEnvironment() const;

 private:
  // The UserMetricsRecorder that |this| is providing internal access to.
  UserMetricsRecorder user_metrics_recorder_;
};

}  // namespace ash

#endif  // ASH_METRICS_USER_METRICS_RECORDER_TEST_API_H_