summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/chromeos/login/login_performer.cc15
-rw-r--r--chrome/browser/chromeos/login/login_status_consumer.h1
-rw-r--r--chrome/tools/chromeactions.txt3
3 files changed, 19 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/login/login_performer.cc b/chrome/browser/chromeos/login/login_performer.cc
index 5dd85ff..5701e86 100644
--- a/chrome/browser/chromeos/login/login_performer.cc
+++ b/chrome/browser/chromeos/login/login_performer.cc
@@ -10,6 +10,7 @@
#include "app/resource_bundle.h"
#include "base/logging.h"
#include "base/message_loop.h"
+#include "base/metrics/histogram.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/chromeos/boot_times_loader.h"
@@ -18,6 +19,7 @@
#include "chrome/browser/chromeos/login/login_utils.h"
#include "chrome/browser/chromeos/login/screen_locker.h"
#include "chrome/browser/chromeos/user_cros_settings_provider.h"
+#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/notification_type.h"
#include "chrome/browser/profiles/profile.h"
@@ -51,6 +53,10 @@ LoginPerformer::~LoginPerformer() {
// LoginPerformer, LoginStatusConsumer implementation:
void LoginPerformer::OnLoginFailure(const LoginFailure& failure) {
+ UserMetrics::RecordAction(UserMetricsAction("Login_Failure"));
+ UMA_HISTOGRAM_ENUMERATION("Login.FailureReason", failure.reason(),
+ LoginFailure::NUM_FAILURE_REASONS);
+
DVLOG(1) << "failure.reason " << failure.reason();
DVLOG(1) << "failure.error.state " << failure.error().state();
@@ -98,6 +104,12 @@ void LoginPerformer::OnLoginSuccess(
const std::string& password,
const GaiaAuthConsumer::ClientLoginResult& credentials,
bool pending_requests) {
+ UserMetrics::RecordAction(UserMetricsAction("Login_Success"));
+ // 0 - Login success offline and online. It's a new user. or it's an
+ // existing user and offline auth took longer than online auth.
+ // 1 - Login success offline only. It's an existing user login.
+ UMA_HISTOGRAM_ENUMERATION("Login.SuccessReason", pending_requests, 2);
+
VLOG(1) << "LoginSuccess, pending_requests " << pending_requests;
if (delegate_) {
delegate_->OnLoginSuccess(username,
@@ -132,6 +144,9 @@ void LoginPerformer::OnLoginSuccess(
}
void LoginPerformer::OnOffTheRecordLoginSuccess() {
+ UserMetrics::RecordAction(
+ UserMetricsAction("Login_GuestLoginSuccess"));
+
if (delegate_)
delegate_->OnOffTheRecordLoginSuccess();
else
diff --git a/chrome/browser/chromeos/login/login_status_consumer.h b/chrome/browser/chromeos/login/login_status_consumer.h
index da30369..c1a18ab 100644
--- a/chrome/browser/chromeos/login/login_status_consumer.h
+++ b/chrome/browser/chromeos/login/login_status_consumer.h
@@ -24,6 +24,7 @@ class LoginFailure {
LOGIN_TIMED_OUT,
UNLOCK_FAILED,
NETWORK_AUTH_FAILED, // Could not authenticate against Google
+ NUM_FAILURE_REASONS, // This has to be the last item.
};
explicit LoginFailure(FailureReason reason)
diff --git a/chrome/tools/chromeactions.txt b/chrome/tools/chromeactions.txt
index c77ffae..18d9212 100644
--- a/chrome/tools/chromeactions.txt
+++ b/chrome/tools/chromeactions.txt
@@ -736,6 +736,9 @@
0xd93d87f83683d666 LanguageOptions_UiLanguageChange_zu
0x384a6609143bbcae LoadURL
0xe009e92f3909009c LoadURLFromKeyword
+0xfb40450c5de92998 Login_Failure
+0x47421e3d3406b4e1 Login_OffTheRecordLoginSuccess
+0xc23fa875d14a7ddb Login_Success
0x84ba0ed3cbdf3956 MediaContextMenu_Controls
0x7b82a108ac28a1ac MediaContextMenu_Loop
0x458edb8f0451b9f5 MediaContextMenu_Mute