| OLD | NEW |
| 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 #include "chromeos/login_event_recorder.h" | 5 #include "chromeos/login_event_recorder.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 | 10 |
| 11 namespace chromeos { | 11 namespace chromeos { |
| 12 | 12 |
| 13 static base::LazyInstance<LoginEventRecorder> g_login_event_recorder = | 13 static base::LazyInstance<LoginEventRecorder>::DestructorAtExit |
| 14 LAZY_INSTANCE_INITIALIZER; | 14 g_login_event_recorder = LAZY_INSTANCE_INITIALIZER; |
| 15 | 15 |
| 16 LoginEventRecorder::LoginEventRecorder() : delegate_(NULL) { | 16 LoginEventRecorder::LoginEventRecorder() : delegate_(NULL) { |
| 17 } | 17 } |
| 18 | 18 |
| 19 LoginEventRecorder::~LoginEventRecorder() { | 19 LoginEventRecorder::~LoginEventRecorder() { |
| 20 } | 20 } |
| 21 | 21 |
| 22 // static | 22 // static |
| 23 LoginEventRecorder* LoginEventRecorder::Get() { | 23 LoginEventRecorder* LoginEventRecorder::Get() { |
| 24 return g_login_event_recorder.Pointer(); | 24 return g_login_event_recorder.Pointer(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 38 if (delegate_) | 38 if (delegate_) |
| 39 delegate_->RecordAuthenticationSuccess(); | 39 delegate_->RecordAuthenticationSuccess(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 void LoginEventRecorder::RecordAuthenticationFailure() { | 42 void LoginEventRecorder::RecordAuthenticationFailure() { |
| 43 if (delegate_) | 43 if (delegate_) |
| 44 delegate_->RecordAuthenticationFailure(); | 44 delegate_->RecordAuthenticationFailure(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 } // namespace chromeos | 47 } // namespace chromeos |
| OLD | NEW |