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

Unified Diff: chrome/browser/chromeos/login/reauth_stats.cc

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/reauth_stats.cc
diff --git a/chrome/browser/chromeos/login/reauth_stats.cc b/chrome/browser/chromeos/login/reauth_stats.cc
index f442c974f012efa6401590731e93e96e03bdffe0..f392465916c8f9e33f0b8b44a43157d63a9d9c52 100644
--- a/chrome/browser/chromeos/login/reauth_stats.cc
+++ b/chrome/browser/chromeos/login/reauth_stats.cc
@@ -9,26 +9,26 @@
namespace chromeos {
-void RecordReauthReason(const std::string& user_id, ReauthReason reason) {
+void RecordReauthReason(const AccountId& account_id, ReauthReason reason) {
user_manager::UserManager* user_manager = user_manager::UserManager::Get();
int old_reason;
// We record only the first value, skipping everything else, except "none"
// value, which is used to reset the current state.
- if (!user_manager->FindReauthReason(user_id, &old_reason) ||
+ if (!user_manager->FindReauthReason(account_id, &old_reason) ||
(static_cast<ReauthReason>(old_reason) == ReauthReason::NONE &&
reason != ReauthReason::NONE)) {
- user_manager->UpdateReauthReason(user_id, static_cast<int>(reason));
+ user_manager->UpdateReauthReason(account_id, static_cast<int>(reason));
}
}
-void SendReauthReason(const std::string& user_id) {
+void SendReauthReason(const AccountId& account_id) {
user_manager::UserManager* user_manager = user_manager::UserManager::Get();
int reauth_reason;
- if (user_manager->FindReauthReason(user_id, &reauth_reason) &&
+ if (user_manager->FindReauthReason(account_id, &reauth_reason) &&
static_cast<ReauthReason>(reauth_reason) != ReauthReason::NONE) {
UMA_HISTOGRAM_ENUMERATION("Login.ReauthReason", reauth_reason,
NUM_REAUTH_FLOW_REASONS);
- user_manager->UpdateReauthReason(user_id,
+ user_manager->UpdateReauthReason(account_id,
static_cast<int>(ReauthReason::NONE));
}
}
« no previous file with comments | « chrome/browser/chromeos/login/reauth_stats.h ('k') | chrome/browser/chromeos/login/saml/saml_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698