Video Player: Add a test to open a single video file
[chromium-blink-merge.git] / chromeos / login_event_recorder.h
blobec695b4d9359ce03908ba9b2e5f1cb3366fea1e7
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
3 // found in the LICENSE file.
5 #ifndef CHROMEOS_LOGIN_EVENT_RECORDER_H_
6 #define CHROMEOS_LOGIN_EVENT_RECORDER_H_
8 #include <string>
10 #include "base/macros.h"
11 #include "chromeos/chromeos_export.h"
13 namespace chromeos {
15 // LoginEventRecorder records the bootimes of Chrome OS.
16 // Actual implementation is handled by delegate.
17 class CHROMEOS_EXPORT LoginEventRecorder {
18 public:
19 class Delegate {
20 public:
21 virtual void AddLoginTimeMarker(const std::string& marker_name,
22 bool send_to_uma) = 0;
24 LoginEventRecorder();
25 virtual ~LoginEventRecorder();
27 static LoginEventRecorder* Get();
29 void SetDelegate(Delegate* delegate);
31 // Add a time marker for login. A timeline will be dumped to
32 // /tmp/login-times-sent after login is done. If |send_to_uma| is true
33 // the time between this marker and the last will be sent to UMA with
34 // the identifier BootTime.|marker_name|.
35 void AddLoginTimeMarker(const std::string& marker_name, bool send_to_uma);
37 private:
38 Delegate* delegate_;
40 DISALLOW_COPY_AND_ASSIGN(LoginEventRecorder);
43 } // namespace chromeos
45 #endif // CHROMEOS_LOGIN_EVENT_RECORDER_H_