summaryrefslogtreecommitdiffstats
path: root/chromeos
diff options
context:
space:
mode:
authorantrim@chromium.org <antrim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-21 11:24:48 +0000
committerantrim@chromium.org <antrim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-21 11:26:22 +0000
commit96936125f63e4692c82bc06c7b046a10e128241c (patch)
tree270a9f945521b1a0e5654ebabf9dadf700b1202d /chromeos
parent3111f0ee4e833332b777f02089dd9d8331243118 (diff)
downloadchromium_src-96936125f63e4692c82bc06c7b046a10e128241c.zip
chromium_src-96936125f63e4692c82bc06c7b046a10e128241c.tar.gz
chromium_src-96936125f63e4692c82bc06c7b046a10e128241c.tar.bz2
Refactoring: get rid of notificataions in ParallelAuthenticator
BUG=387613 R=nkostylev@chromium.org TBR=stevenjb@chromium.org Review URL: https://codereview.chromium.org/409113002 Cr-Commit-Position: refs/heads/master@{#291045} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291045 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos')
-rw-r--r--chromeos/login_event_recorder.cc10
-rw-r--r--chromeos/login_event_recorder.h16
2 files changed, 26 insertions, 0 deletions
diff --git a/chromeos/login_event_recorder.cc b/chromeos/login_event_recorder.cc
index e2e2e3f..c3d67d6 100644
--- a/chromeos/login_event_recorder.cc
+++ b/chromeos/login_event_recorder.cc
@@ -34,4 +34,14 @@ void LoginEventRecorder::AddLoginTimeMarker(const std::string& marker_name,
delegate_->AddLoginTimeMarker(marker_name, send_to_uma);
}
+void LoginEventRecorder::RecordAuthenticationSuccess() {
+ if (delegate_)
+ delegate_->RecordAuthenticationSuccess();
+}
+
+void LoginEventRecorder::RecordAuthenticationFailure() {
+ if (delegate_)
+ delegate_->RecordAuthenticationFailure();
+}
+
} // namespace chromeos
diff --git a/chromeos/login_event_recorder.h b/chromeos/login_event_recorder.h
index ec695b4..f4d0f8b 100644
--- a/chromeos/login_event_recorder.h
+++ b/chromeos/login_event_recorder.h
@@ -18,8 +18,18 @@ class CHROMEOS_EXPORT LoginEventRecorder {
public:
class Delegate {
public:
+ // Add a time marker for login. A timeline will be dumped to
+ // /tmp/login-times-sent after login is done. If |send_to_uma| is true
+ // the time between this marker and the last will be sent to UMA with
+ // the identifier BootTime.|marker_name|.
virtual void AddLoginTimeMarker(const std::string& marker_name,
bool send_to_uma) = 0;
+
+ // Record events for successful authentication.
+ virtual void RecordAuthenticationSuccess() = 0;
+
+ // Record events for authentication failure.
+ virtual void RecordAuthenticationFailure() = 0;
};
LoginEventRecorder();
virtual ~LoginEventRecorder();
@@ -34,6 +44,12 @@ class CHROMEOS_EXPORT LoginEventRecorder {
// the identifier BootTime.|marker_name|.
void AddLoginTimeMarker(const std::string& marker_name, bool send_to_uma);
+ // Record events for successful authentication.
+ void RecordAuthenticationSuccess();
+
+ // Record events for authentication failure.
+ void RecordAuthenticationFailure();
+
private:
Delegate* delegate_;