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

Side by Side Diff: chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc

Issue 1132523002: UMA to track the reason for re-auth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: initialize local state Created 5 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
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 "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h" 5 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/prefs/pref_service.h" 13 #include "base/prefs/pref_service.h"
14 #include "base/time/clock.h" 14 #include "base/time/clock.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "chrome/browser/chromeos/login/reauth_stats.h"
16 #include "chrome/browser/chromeos/profiles/profile_helper.h" 17 #include "chrome/browser/chromeos/profiles/profile_helper.h"
17 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/common/pref_names.h" 19 #include "chrome/common/pref_names.h"
19 #include "components/pref_registry/pref_registry_syncable.h" 20 #include "components/pref_registry/pref_registry_syncable.h"
20 #include "components/user_manager/user.h" 21 #include "components/user_manager/user.h"
21 #include "components/user_manager/user_manager.h" 22 #include "components/user_manager/user_manager.h"
22 23
23 namespace chromeos { 24 namespace chromeos {
24 25
25 namespace { 26 namespace {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 138
138 void SAMLOfflineSigninLimiter::ForceOnlineLogin() { 139 void SAMLOfflineSigninLimiter::ForceOnlineLogin() {
139 const user_manager::User* user = 140 const user_manager::User* user =
140 ProfileHelper::Get()->GetUserByProfile(profile_); 141 ProfileHelper::Get()->GetUserByProfile(profile_);
141 if (!user) { 142 if (!user) {
142 NOTREACHED(); 143 NOTREACHED();
143 return; 144 return;
144 } 145 }
145 146
146 user_manager::UserManager::Get()->SaveForceOnlineSignin(user->email(), true); 147 user_manager::UserManager::Get()->SaveForceOnlineSignin(user->email(), true);
148 RecordReauthReason(user->email(), ReauthReason::SAML_REAUTH_POLICY);
147 offline_signin_limit_timer_.reset(); 149 offline_signin_limit_timer_.reset();
148 } 150 }
149 151
150 } // namespace chromeos 152 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698