| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/arc/arc_session_manager.h" | 5 #include "chrome/browser/chromeos/arc/arc_session_manager.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/common/shelf/shelf_delegate.h" | 9 #include "ash/common/shelf/shelf_delegate.h" |
| 10 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 error = ArcSupportHost::Error::SIGN_IN_GMS_NOT_AVAILABLE_ERROR; | 392 error = ArcSupportHost::Error::SIGN_IN_GMS_NOT_AVAILABLE_ERROR; |
| 393 break; | 393 break; |
| 394 case ProvisioningResult::CLOUD_PROVISION_FLOW_FAILED: | 394 case ProvisioningResult::CLOUD_PROVISION_FLOW_FAILED: |
| 395 case ProvisioningResult::CLOUD_PROVISION_FLOW_TIMEOUT: | 395 case ProvisioningResult::CLOUD_PROVISION_FLOW_TIMEOUT: |
| 396 case ProvisioningResult::CLOUD_PROVISION_FLOW_INTERNAL_ERROR: | 396 case ProvisioningResult::CLOUD_PROVISION_FLOW_INTERNAL_ERROR: |
| 397 error = ArcSupportHost::Error::SIGN_IN_CLOUD_PROVISION_FLOW_FAIL_ERROR; | 397 error = ArcSupportHost::Error::SIGN_IN_CLOUD_PROVISION_FLOW_FAIL_ERROR; |
| 398 break; | 398 break; |
| 399 case ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR: | 399 case ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR: |
| 400 error = ArcSupportHost::Error::SERVER_COMMUNICATION_ERROR; | 400 error = ArcSupportHost::Error::SERVER_COMMUNICATION_ERROR; |
| 401 break; | 401 break; |
| 402 case ProvisioningResult::NO_NETWORK_CONNECTION: |
| 403 // TODO(khmel): Use explicit error for M58+ builds. |
| 404 error = ArcSupportHost::Error::SIGN_IN_SERVICE_UNAVAILABLE_ERROR; |
| 405 break; |
| 402 default: | 406 default: |
| 403 error = ArcSupportHost::Error::SIGN_IN_UNKNOWN_ERROR; | 407 error = ArcSupportHost::Error::SIGN_IN_UNKNOWN_ERROR; |
| 404 break; | 408 break; |
| 405 } | 409 } |
| 406 | 410 |
| 407 if (result == ProvisioningResult::ARC_STOPPED || | 411 if (result == ProvisioningResult::ARC_STOPPED || |
| 408 result == ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR) { | 412 result == ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR) { |
| 409 if (profile_->GetPrefs()->HasPrefPath(prefs::kArcSignedIn)) | 413 if (profile_->GetPrefs()->HasPrefPath(prefs::kArcSignedIn)) |
| 410 profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, false); | 414 profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, false); |
| 411 ShutdownSession(); | 415 ShutdownSession(); |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 | 1027 |
| 1024 #undef MAP_STATE | 1028 #undef MAP_STATE |
| 1025 | 1029 |
| 1026 // Some compilers report an error even if all values of an enum-class are | 1030 // Some compilers report an error even if all values of an enum-class are |
| 1027 // covered exhaustively in a switch statement. | 1031 // covered exhaustively in a switch statement. |
| 1028 NOTREACHED() << "Invalid value " << static_cast<int>(state); | 1032 NOTREACHED() << "Invalid value " << static_cast<int>(state); |
| 1029 return os; | 1033 return os; |
| 1030 } | 1034 } |
| 1031 | 1035 |
| 1032 } // namespace arc | 1036 } // namespace arc |
| OLD | NEW |