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

Unified Diff: blimp/client/core/session/identity_source.cc

Issue 2391263005: Propagate error messages to UI for blimp. (Closed)
Patch Set: Minor fixes. Created 4 years, 2 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: blimp/client/core/session/identity_source.cc
diff --git a/blimp/client/core/session/identity_source.cc b/blimp/client/core/session/identity_source.cc
index 4fd8daa6109981ed1ac5af5e4ad57f3ee66dd7ac..40d91cf33b5186d06a4478c26895566635e03a6b 100644
--- a/blimp/client/core/session/identity_source.cc
+++ b/blimp/client/core/session/identity_source.cc
@@ -56,8 +56,7 @@ void IdentitySource::Connect() {
// User must sign in first to get an OAuth2 token.
const std::string& account_id = identity_provider_->GetActiveAccountId();
if (account_id.empty()) {
- delegate_->OnAuthenticationError(
- BlimpClientContextDelegate::AuthError::NOT_SIGNED_IN);
+ VLOG(1) << "User is not signed in before connection to Blimp engine.";
return;
}
@@ -116,9 +115,10 @@ void IdentitySource::OnGetTokenFailure(
is_fetching_token_ = false;
retry_times_ = 0;
VLOG(1) << "OAuth2 token error: " << error.state();
+
+ // Propagate the error.
DCHECK(delegate_);
- delegate_->OnAuthenticationError(
- BlimpClientContextDelegate::AuthError::OAUTH_TOKEN_FAIL);
+ delegate_->OnAuthenticationError(error);
}
void IdentitySource::OnRefreshTokenAvailable(const std::string& account_id) {
« no previous file with comments | « blimp/client/core/context/blimp_client_context_impl.cc ('k') | blimp/client/core/session/identity_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698