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

Unified Diff: blimp/client/app/linux/blimp_client_context_delegate_linux.cc

Issue 2431653004: Setup Blimp internal string resources. (Closed)
Patch Set: Added some recent blimp java xml file. Created 4 years, 1 month 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 | « blimp/client/app/blimp_startup.cc ('k') | blimp/client/app/linux/blimp_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d7003d907f365df1720b5a184e1c560affc831a9..cc335e4156af95c3493074cfaa9dbe65e81810d4 100644
--- a/blimp/client/app/linux/blimp_client_context_delegate_linux.cc
+++ b/blimp/client/app/linux/blimp_client_context_delegate_linux.cc
@@ -4,6 +4,7 @@
#include "base/memory/ptr_util.h"
#include "blimp/client/app/linux/blimp_client_context_delegate_linux.h"
+#include "blimp/client/public/resources/blimp_strings.h"
#include "blimp/client/support/session/blimp_default_identity_provider.h"
#include "net/base/net_errors.h"
@@ -20,48 +21,10 @@ void BlimpClientContextDelegateLinux::AttachBlimpContentsHelpers(
void BlimpClientContextDelegateLinux::OnAssignmentConnectionAttempted(
AssignmentRequestResult result,
const Assignment& assignment) {
- // TODO(xingliu): Update this to use the new error strings and logging helper
- // 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";
- break;
- case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_UNKNOWN:
- LOG(WARNING) << "Assignment request result unknown";
- break;
- case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_BAD_REQUEST:
- LOG(WARNING) << "Assignment request error: Bad request";
- break;
- case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_BAD_RESPONSE:
- LOG(WARNING) << "Assignment request error: Bad response";
- break;
- case AssignmentRequestResult::
- ASSIGNMENT_REQUEST_RESULT_INVALID_PROTOCOL_VERSION:
- LOG(WARNING) << "Assignment request error: Invalid protocol version";
- break;
- case AssignmentRequestResult::
- ASSIGNMENT_REQUEST_RESULT_EXPIRED_ACCESS_TOKEN:
- LOG(WARNING) << "Assignment request error: Expired access token";
- break;
- case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_USER_INVALID:
- LOG(WARNING) << "Assignment request error: User invalid";
- break;
- case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_OUT_OF_VMS:
- LOG(WARNING) << "Assignment request error: Out of VMs";
- break;
- case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_SERVER_ERROR:
- LOG(WARNING) << "Assignment request error: Server error";
- break;
- case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_SERVER_INTERRUPTED:
- LOG(WARNING) << "Assignment request error: Server interrupted";
- break;
- case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_NETWORK_FAILURE:
- LOG(WARNING) << "Assignment request error: Network failure";
- break;
- case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_INVALID_CERT:
- LOG(WARNING) << "Assignment request error: Invalid cert";
- break;
- }
+ if (result == ASSIGNMENT_REQUEST_RESULT_OK)
+ return;
+
+ LOG(WARNING) << string::AssignmentResultErrorToString(result);
}
std::unique_ptr<IdentityProvider>
@@ -79,7 +42,8 @@ void BlimpClientContextDelegateLinux::OnConnected() {
}
void BlimpClientContextDelegateLinux::OnEngineDisconnected(int result) {
- LOG(WARNING) << "Disconnected from the engine, reason: " << result;
+ LOG(WARNING) << "Disconnected from the engine, reason: "
+ << string::EndConnectionMessageToString(result);
}
void BlimpClientContextDelegateLinux::OnNetworkDisconnected(int result) {
« no previous file with comments | « blimp/client/app/blimp_startup.cc ('k') | blimp/client/app/linux/blimp_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698