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

Unified Diff: chrome/browser/chromeos/policy/wildcard_login_checker.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/policy/wildcard_login_checker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/policy/wildcard_login_checker.cc
===================================================================
--- chrome/browser/chromeos/policy/wildcard_login_checker.cc (revision 259991)
+++ chrome/browser/chromeos/policy/wildcard_login_checker.cc (working copy)
@@ -71,13 +71,14 @@
now - start_timestamp_);
}
- OnCheckCompleted(response->HasKey(kHostedDomainKey));
+ OnCheckCompleted(response->HasKey(kHostedDomainKey) ? RESULT_ALLOWED
+ : RESULT_BLOCKED);
}
void WildcardLoginChecker::OnGetUserInfoFailure(
const GoogleServiceAuthError& error) {
LOG(ERROR) << "Failed to fetch user info " << error.ToString();
- OnCheckCompleted(false);
+ OnCheckCompleted(RESULT_FAILED);
}
void WildcardLoginChecker::OnPolicyTokenFetched(
@@ -85,7 +86,7 @@
const GoogleServiceAuthError& error) {
if (error.state() != GoogleServiceAuthError::NONE) {
LOG(ERROR) << "Failed to fetch policy token " << error.ToString();
- OnCheckCompleted(false);
+ OnCheckCompleted(RESULT_FAILED);
return;
}
@@ -106,7 +107,7 @@
user_info_fetcher_->Start(access_token);
}
-void WildcardLoginChecker::OnCheckCompleted(bool result) {
+void WildcardLoginChecker::OnCheckCompleted(Result result) {
if (!callback_.is_null())
callback_.Run(result);
}
« no previous file with comments | « chrome/browser/chromeos/policy/wildcard_login_checker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698