Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "base/memory/ptr_util.h" | |
| 6 #include "blimp/client/app/linux/blimp_client_context_delegate_linux.h" | |
| 7 #include "blimp/client/support/session/blimp_default_identity_provider.h" | |
| 8 | |
| 9 namespace blimp { | |
| 10 namespace client { | |
| 11 | |
| 12 BlimpClientContextDelegateLinux::BlimpClientContextDelegateLinux() = default; | |
| 13 | |
| 14 BlimpClientContextDelegateLinux::~BlimpClientContextDelegateLinux() = default; | |
| 15 | |
| 16 void BlimpClientContextDelegateLinux::AttachBlimpContentsHelpers( | |
| 17 BlimpContents* blimp_contents) {} | |
| 18 | |
| 19 void BlimpClientContextDelegateLinux::OnAssignmentConnectionAttempted( | |
| 20 AssignmentRequestResult result, | |
| 21 const Assignment& assignment) { | |
| 22 switch (result) { | |
| 23 case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_OK: | |
| 24 VLOG(0) << "Assignment request success"; | |
| 25 break; | |
| 26 case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_UNKNOWN: | |
| 27 LOG(WARNING) << "Assignment request result unknown"; | |
| 28 break; | |
| 29 case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_BAD_REQUEST: | |
| 30 LOG(WARNING) << "Assignment request error: Bad request"; | |
|
Kevin M
2016/09/28 01:35:46
Recommend adding this code to string table to the
David Trainor- moved to gerrit
2016/09/28 16:34:01
This is happening at a slightly higher level in xi
steimel
2016/09/28 20:33:07
Added TODO for xingliu@ to update to use new error
| |
| 31 break; | |
| 32 case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_BAD_RESPONSE: | |
| 33 LOG(WARNING) << "Assignment request error: Bad response"; | |
| 34 break; | |
| 35 case AssignmentRequestResult:: | |
| 36 ASSIGNMENT_REQUEST_RESULT_INVALID_PROTOCOL_VERSION: | |
| 37 LOG(WARNING) << "Assignment request error: Invalid protocol version"; | |
| 38 break; | |
| 39 case AssignmentRequestResult:: | |
| 40 ASSIGNMENT_REQUEST_RESULT_EXPIRED_ACCESS_TOKEN: | |
| 41 LOG(WARNING) << "Assignment request error: Expired access token"; | |
| 42 break; | |
| 43 case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_USER_INVALID: | |
| 44 LOG(WARNING) << "Assignment request error: User invalid"; | |
| 45 break; | |
| 46 case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_OUT_OF_VMS: | |
| 47 LOG(WARNING) << "Assignment request error: Out of VMs"; | |
| 48 break; | |
| 49 case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_SERVER_ERROR: | |
| 50 LOG(WARNING) << "Assignment request error: Server error"; | |
| 51 break; | |
| 52 case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_SERVER_INTERRUPTED: | |
| 53 LOG(WARNING) << "Assignment request error: Server interrupted"; | |
| 54 break; | |
| 55 case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_NETWORK_FAILURE: | |
| 56 LOG(WARNING) << "Assignment request error: Network failure"; | |
| 57 break; | |
| 58 case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_INVALID_CERT: | |
| 59 LOG(WARNING) << "Assignment request error: Invalid cert"; | |
| 60 break; | |
| 61 } | |
| 62 } | |
| 63 | |
| 64 std::unique_ptr<IdentityProvider> | |
| 65 BlimpClientContextDelegateLinux::CreateIdentityProvider() { | |
| 66 return base::MakeUnique<BlimpDefaultIdentityProvider>(); | |
| 67 } | |
| 68 | |
| 69 void BlimpClientContextDelegateLinux::OnAuthenticationError( | |
| 70 BlimpClientContextDelegate::AuthError error) { | |
| 71 switch (error) { | |
| 72 case BlimpClientContextDelegate::AuthError::NOT_SIGNED_IN: | |
| 73 LOG(WARNING) << "Error: Not signed in"; | |
| 74 break; | |
| 75 case BlimpClientContextDelegate::AuthError::OAUTH_TOKEN_FAIL: | |
| 76 LOG(WARNING) << "Error: OAuth token failure"; | |
| 77 break; | |
| 78 } | |
| 79 } | |
| 80 | |
| 81 } // namespace client | |
| 82 } // namespace blimp | |
| OLD | NEW |