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

Side by Side Diff: chromeos/login/auth/login_performer.cc

Issue 2842083002: Report Login.SuccessReason in LoginPerformer (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « chromeos/login/auth/auth_status_consumer.h ('k') | no next file » | 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 #include "chromeos/login/auth/login_performer.h" 5 #include "chromeos/login/auth/login_performer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } else { 72 } else {
73 // COULD_NOT_MOUNT_CRYPTOHOME, COULD_NOT_MOUNT_TMPFS: 73 // COULD_NOT_MOUNT_CRYPTOHOME, COULD_NOT_MOUNT_TMPFS:
74 // happens during offline auth only. 74 // happens during offline auth only.
75 NOTREACHED(); 75 NOTREACHED();
76 } 76 }
77 } 77 }
78 78
79 void LoginPerformer::OnAuthSuccess(const UserContext& user_context) { 79 void LoginPerformer::OnAuthSuccess(const UserContext& user_context) {
80 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 80 DCHECK(task_runner_->RunsTasksOnCurrentThread());
81 base::RecordAction(UserMetricsAction("Login_Success")); 81 base::RecordAction(UserMetricsAction("Login_Success"));
82
83 // Do not distinguish between offline and online success.
84 UMA_HISTOGRAM_ENUMERATION("Login.SuccessReason", OFFLINE_AND_ONLINE,
85 NUM_SUCCESS_REASONS);
86
82 VLOG(1) << "LoginSuccess hash: " << user_context.GetUserIDHash(); 87 VLOG(1) << "LoginSuccess hash: " << user_context.GetUserIDHash();
83 DCHECK(delegate_); 88 DCHECK(delegate_);
84 // After delegate_->OnAuthSuccess(...) is called, delegate_ releases 89 // After delegate_->OnAuthSuccess(...) is called, delegate_ releases
85 // LoginPerformer ownership. LP now manages it's lifetime on its own. 90 // LoginPerformer ownership. LP now manages it's lifetime on its own.
86 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); 91 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
87 delegate_->OnAuthSuccess(user_context); 92 delegate_->OnAuthSuccess(user_context);
88 } 93 }
89 94
90 void LoginPerformer::OnOffTheRecordAuthSuccess() { 95 void LoginPerformer::OnOffTheRecordAuthSuccess() {
91 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 96 DCHECK(task_runner_->RunsTasksOnCurrentThread());
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 } else { 311 } else {
307 NOTREACHED(); 312 NOTREACHED();
308 } 313 }
309 user_context_.ClearSecrets(); 314 user_context_.ClearSecrets();
310 } 315 }
311 316
312 void LoginPerformer::EnsureAuthenticator() { 317 void LoginPerformer::EnsureAuthenticator() {
313 authenticator_ = CreateAuthenticator(); 318 authenticator_ = CreateAuthenticator();
314 } 319 }
315 } // namespace chromeos 320 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/login/auth/auth_status_consumer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698