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

Unified Diff: chrome/browser/chromeos/policy/wildcard_login_checker.h

Issue 181363002: Properly handle failure modes in the wildcard login check. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
Index: chrome/browser/chromeos/policy/wildcard_login_checker.h
diff --git a/chrome/browser/chromeos/policy/wildcard_login_checker.h b/chrome/browser/chromeos/policy/wildcard_login_checker.h
index 38b3cff62282dbf16413321f45b2a75bc40a5dfb..358788dd0a4b6b22079ef5bee6cde9ff8d1db691 100644
--- a/chrome/browser/chromeos/policy/wildcard_login_checker.h
+++ b/chrome/browser/chromeos/policy/wildcard_login_checker.h
@@ -25,7 +25,14 @@ class PolicyOAuth2TokenFetcher;
// reports the result via a callback.
class WildcardLoginChecker : public UserInfoFetcher::Delegate {
public:
- typedef base::Callback<void(bool)> StatusCallback;
+ // Indicates result of the wildcard login check.
+ enum Result {
+ RESULT_ALLOWED, // Wildcard check succeeded, login allowed.
+ RESULT_BLOCKED, // Check completed, but user should be blocked.
+ RESULT_FAILED, // Failure due to network errors etc.
+ };
+
+ typedef base::Callback<void(Result)> StatusCallback;
WildcardLoginChecker();
virtual ~WildcardLoginChecker();
@@ -53,7 +60,7 @@ class WildcardLoginChecker : public UserInfoFetcher::Delegate {
void StartUserInfoFetcher(const std::string& access_token);
// Handles the response of the check and calls ReportResult().
- void OnCheckCompleted(bool result);
+ void OnCheckCompleted(Result result);
StatusCallback callback_;

Powered by Google App Engine
This is Rietveld 408576698