Fix a couple bugs in the settings_page_header wrt breadcrumbs.
[chromium-blink-merge.git] / chromeos / login_event_recorder.cc
blobc3d67d6da1bbc4ba1ef11dfc2f8f503d2aca6af6
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 #include "chromeos/login_event_recorder.h"
7 #include <vector>
9 #include "base/lazy_instance.h"
11 namespace chromeos {
13 static base::LazyInstance<LoginEventRecorder> g_login_event_recorder =
14 LAZY_INSTANCE_INITIALIZER;
16 LoginEventRecorder::LoginEventRecorder() : delegate_(NULL) {
19 LoginEventRecorder::~LoginEventRecorder() {
22 // static
23 LoginEventRecorder* LoginEventRecorder::Get() {
24 return g_login_event_recorder.Pointer();
27 void LoginEventRecorder::SetDelegate(LoginEventRecorder::Delegate* delegate) {
28 delegate_ = delegate;
31 void LoginEventRecorder::AddLoginTimeMarker(const std::string& marker_name,
32 bool send_to_uma) {
33 if (delegate_)
34 delegate_->AddLoginTimeMarker(marker_name, send_to_uma);
37 void LoginEventRecorder::RecordAuthenticationSuccess() {
38 if (delegate_)
39 delegate_->RecordAuthenticationSuccess();
42 void LoginEventRecorder::RecordAuthenticationFailure() {
43 if (delegate_)
44 delegate_->RecordAuthenticationFailure();
47 } // namespace chromeos