| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |