| 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 case ProvisioningResult::CLOUD_PROVISION_FLOW_INTERNAL_ERROR: | 346 case ProvisioningResult::CLOUD_PROVISION_FLOW_INTERNAL_ERROR: |
| 347 error = ArcSupportHost::Error::SIGN_IN_CLOUD_PROVISION_FLOW_FAIL_ERROR; | 347 error = ArcSupportHost::Error::SIGN_IN_CLOUD_PROVISION_FLOW_FAIL_ERROR; |
| 348 break; | 348 break; |
| 349 case ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR: | 349 case ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR: |
| 350 error = ArcSupportHost::Error::SERVER_COMMUNICATION_ERROR; | 350 error = ArcSupportHost::Error::SERVER_COMMUNICATION_ERROR; |
| 351 break; | 351 break; |
| 352 case ProvisioningResult::NO_NETWORK_CONNECTION: | 352 case ProvisioningResult::NO_NETWORK_CONNECTION: |
| 353 // TODO(khmel): Use explicit error for M58+ builds. | 353 // TODO(khmel): Use explicit error for M58+ builds. |
| 354 error = ArcSupportHost::Error::SIGN_IN_SERVICE_UNAVAILABLE_ERROR; | 354 error = ArcSupportHost::Error::SIGN_IN_SERVICE_UNAVAILABLE_ERROR; |
| 355 break; | 355 break; |
| 356 case ProvisioningResult::ARC_DISABLED: |
| 357 error = ArcSupportHost::Error::ANDROID_MANAGEMENT_REQUIRED_ERROR; |
| 358 break; |
| 356 default: | 359 default: |
| 357 error = ArcSupportHost::Error::SIGN_IN_UNKNOWN_ERROR; | 360 error = ArcSupportHost::Error::SIGN_IN_UNKNOWN_ERROR; |
| 358 break; | 361 break; |
| 359 } | 362 } |
| 360 | 363 |
| 361 if (result == ProvisioningResult::ARC_STOPPED || | 364 if (result == ProvisioningResult::ARC_STOPPED || |
| 362 result == ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR) { | 365 result == ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR) { |
| 363 if (profile_->GetPrefs()->HasPrefPath(prefs::kArcSignedIn)) | 366 if (profile_->GetPrefs()->HasPrefPath(prefs::kArcSignedIn)) |
| 364 profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, false); | 367 profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, false); |
| 365 ShutdownSession(); | 368 ShutdownSession(); |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 | 913 |
| 911 #undef MAP_STATE | 914 #undef MAP_STATE |
| 912 | 915 |
| 913 // Some compilers report an error even if all values of an enum-class are | 916 // Some compilers report an error even if all values of an enum-class are |
| 914 // covered exhaustively in a switch statement. | 917 // covered exhaustively in a switch statement. |
| 915 NOTREACHED() << "Invalid value " << static_cast<int>(state); | 918 NOTREACHED() << "Invalid value " << static_cast<int>(state); |
| 916 return os; | 919 return os; |
| 917 } | 920 } |
| 918 | 921 |
| 919 } // namespace arc | 922 } // namespace arc |
| OLD | NEW |