Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: chromeos/login_event_recorder.h

Issue 409113002: Refactoring: get rid of notificataions in ParallelAuthenticator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_browser_chromeos.gypi ('k') | chromeos/login_event_recorder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROMEOS_LOGIN_EVENT_RECORDER_H_ 5 #ifndef CHROMEOS_LOGIN_EVENT_RECORDER_H_
6 #define CHROMEOS_LOGIN_EVENT_RECORDER_H_ 6 #define CHROMEOS_LOGIN_EVENT_RECORDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "chromeos/chromeos_export.h" 11 #include "chromeos/chromeos_export.h"
12 12
13 namespace chromeos { 13 namespace chromeos {
14 14
15 // LoginEventRecorder records the bootimes of Chrome OS. 15 // LoginEventRecorder records the bootimes of Chrome OS.
16 // Actual implementation is handled by delegate. 16 // Actual implementation is handled by delegate.
17 class CHROMEOS_EXPORT LoginEventRecorder { 17 class CHROMEOS_EXPORT LoginEventRecorder {
18 public: 18 public:
19 class Delegate { 19 class Delegate {
20 public: 20 public:
21 // Add a time marker for login. A timeline will be dumped to
22 // /tmp/login-times-sent after login is done. If |send_to_uma| is true
23 // the time between this marker and the last will be sent to UMA with
24 // the identifier BootTime.|marker_name|.
21 virtual void AddLoginTimeMarker(const std::string& marker_name, 25 virtual void AddLoginTimeMarker(const std::string& marker_name,
22 bool send_to_uma) = 0; 26 bool send_to_uma) = 0;
27
28 // Record events for successful authentication.
29 virtual void RecordAuthenticationSuccess() = 0;
30
31 // Record events for authentication failure.
32 virtual void RecordAuthenticationFailure() = 0;
23 }; 33 };
24 LoginEventRecorder(); 34 LoginEventRecorder();
25 virtual ~LoginEventRecorder(); 35 virtual ~LoginEventRecorder();
26 36
27 static LoginEventRecorder* Get(); 37 static LoginEventRecorder* Get();
28 38
29 void SetDelegate(Delegate* delegate); 39 void SetDelegate(Delegate* delegate);
30 40
31 // Add a time marker for login. A timeline will be dumped to 41 // 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 42 // /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 43 // the time between this marker and the last will be sent to UMA with
34 // the identifier BootTime.|marker_name|. 44 // the identifier BootTime.|marker_name|.
35 void AddLoginTimeMarker(const std::string& marker_name, bool send_to_uma); 45 void AddLoginTimeMarker(const std::string& marker_name, bool send_to_uma);
36 46
47 // Record events for successful authentication.
48 void RecordAuthenticationSuccess();
49
50 // Record events for authentication failure.
51 void RecordAuthenticationFailure();
52
37 private: 53 private:
38 Delegate* delegate_; 54 Delegate* delegate_;
39 55
40 DISALLOW_COPY_AND_ASSIGN(LoginEventRecorder); 56 DISALLOW_COPY_AND_ASSIGN(LoginEventRecorder);
41 }; 57 };
42 58
43 } // namespace chromeos 59 } // namespace chromeos
44 60
45 #endif // CHROMEOS_LOGIN_EVENT_RECORDER_H_ 61 #endif // CHROMEOS_LOGIN_EVENT_RECORDER_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser_chromeos.gypi ('k') | chromeos/login_event_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698