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

Unified Diff: blimp/client/app/linux/blimp_client_context_delegate_linux.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/app/linux/blimp_client_context_delegate_linux.cc
diff --git a/blimp/client/app/linux/blimp_client_context_delegate_linux.cc b/blimp/client/app/linux/blimp_client_context_delegate_linux.cc
index db7f2ff4fa99d798845ab6798ac93ebe1d3ce2c6..d7003d907f365df1720b5a184e1c560affc831a9 100644
--- a/blimp/client/app/linux/blimp_client_context_delegate_linux.cc
+++ b/blimp/client/app/linux/blimp_client_context_delegate_linux.cc
@@ -5,6 +5,7 @@
#include "base/memory/ptr_util.h"
#include "blimp/client/app/linux/blimp_client_context_delegate_linux.h"
#include "blimp/client/support/session/blimp_default_identity_provider.h"
+#include "net/base/net_errors.h"
namespace blimp {
namespace client {
@@ -20,7 +21,7 @@ void BlimpClientContextDelegateLinux::OnAssignmentConnectionAttempted(
AssignmentRequestResult result,
const Assignment& assignment) {
// TODO(xingliu): Update this to use the new error strings and logging helper
- // methods.
+ // methods, and access the string from grd files. https://crbug.com/630687
switch (result) {
case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_OK:
VLOG(0) << "Assignment request success";
@@ -69,17 +70,20 @@ BlimpClientContextDelegateLinux::CreateIdentityProvider() {
}
void BlimpClientContextDelegateLinux::OnAuthenticationError(
- BlimpClientContextDelegate::AuthError error) {
- // TODO(xingliu): Update this to use the new error strings and logging helper
- // methods.
- switch (error) {
- case BlimpClientContextDelegate::AuthError::NOT_SIGNED_IN:
- LOG(WARNING) << "Error: Not signed in";
- break;
- case BlimpClientContextDelegate::AuthError::OAUTH_TOKEN_FAIL:
- LOG(WARNING) << "Error: OAuth token failure";
- break;
- }
+ const GoogleServiceAuthError& error) {
+ LOG(WARNING) << "GoogleAuth error : " << error.ToString();
+}
+
+void BlimpClientContextDelegateLinux::OnConnected() {
+ VLOG(1) << "Connected.";
+}
+
+void BlimpClientContextDelegateLinux::OnEngineDisconnected(int result) {
+ LOG(WARNING) << "Disconnected from the engine, reason: " << result;
+}
+
+void BlimpClientContextDelegateLinux::OnNetworkDisconnected(int result) {
+ LOG(WARNING) << "Disconnected, reason: " << net::ErrorToShortString(result);
}
} // namespace client
« no previous file with comments | « blimp/client/app/linux/blimp_client_context_delegate_linux.h ('k') | blimp/client/core/context/blimp_client_context_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698