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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc

Issue 214463007: Merge 253627 "Properly handle failure modes in the wildcard logi..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1847/src/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/policy/user_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 "Enterprise.UserPolicyChromeOS.InitialFetch.DelayOAuth2Token"; 42 "Enterprise.UserPolicyChromeOS.InitialFetch.DelayOAuth2Token";
43 const char kUMAInitialFetchDelayPolicyFetch[] = 43 const char kUMAInitialFetchDelayPolicyFetch[] =
44 "Enterprise.UserPolicyChromeOS.InitialFetch.DelayPolicyFetch"; 44 "Enterprise.UserPolicyChromeOS.InitialFetch.DelayPolicyFetch";
45 const char kUMAInitialFetchDelayTotal[] = 45 const char kUMAInitialFetchDelayTotal[] =
46 "Enterprise.UserPolicyChromeOS.InitialFetch.DelayTotal"; 46 "Enterprise.UserPolicyChromeOS.InitialFetch.DelayTotal";
47 const char kUMAInitialFetchOAuth2Error[] = 47 const char kUMAInitialFetchOAuth2Error[] =
48 "Enterprise.UserPolicyChromeOS.InitialFetch.OAuth2Error"; 48 "Enterprise.UserPolicyChromeOS.InitialFetch.OAuth2Error";
49 const char kUMAInitialFetchOAuth2NetworkError[] = 49 const char kUMAInitialFetchOAuth2NetworkError[] =
50 "Enterprise.UserPolicyChromeOS.InitialFetch.OAuth2NetworkError"; 50 "Enterprise.UserPolicyChromeOS.InitialFetch.OAuth2NetworkError";
51 51
52 void OnWildcardCheckCompleted(const std::string& username, bool result) { 52 void OnWildcardCheckCompleted(const std::string& username,
53 if (!result) { 53 WildcardLoginChecker::Result result) {
54 if (result == WildcardLoginChecker::RESULT_BLOCKED) {
54 LOG(ERROR) << "Online wildcard login check failed, terminating session."; 55 LOG(ERROR) << "Online wildcard login check failed, terminating session.";
55 56
56 // TODO(mnissler): This only removes the user pod from the login screen, but 57 // TODO(mnissler): This only removes the user pod from the login screen, but
57 // the cryptohome remains. This is because deleting the cryptohome for a 58 // the cryptohome remains. This is because deleting the cryptohome for a
58 // logged-in session is not possible. Fix this either by delaying the 59 // logged-in session is not possible. Fix this either by delaying the
59 // cryptohome deletion operation or by getting rid of the in-session 60 // cryptohome deletion operation or by getting rid of the in-session
60 // wildcard check. 61 // wildcard check.
61 chromeos::UserManager::Get()->RemoveUserFromList(username); 62 chromeos::UserManager::Get()->RemoveUserFromList(username);
62 chrome::AttemptUserExit(); 63 chrome::AttemptUserExit();
63 } 64 }
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 // OnComponentCloudPolicyUpdated() once it's ready. 372 // OnComponentCloudPolicyUpdated() once it's ready.
372 return; 373 return;
373 } 374 }
374 375
375 core()->StartRefreshScheduler(); 376 core()->StartRefreshScheduler();
376 core()->TrackRefreshDelayPref(local_state_, 377 core()->TrackRefreshDelayPref(local_state_,
377 policy_prefs::kUserPolicyRefreshRate); 378 policy_prefs::kUserPolicyRefreshRate);
378 } 379 }
379 380
380 } // namespace policy 381 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_performer.cc ('k') | chrome/browser/chromeos/policy/wildcard_login_checker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698