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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 error = ArcSupportHost::Error::SIGN_IN_GMS_NOT_AVAILABLE_ERROR; | 337 error = ArcSupportHost::Error::SIGN_IN_GMS_NOT_AVAILABLE_ERROR; |
338 break; | 338 break; |
339 case ProvisioningResult::CLOUD_PROVISION_FLOW_FAILED: | 339 case ProvisioningResult::CLOUD_PROVISION_FLOW_FAILED: |
340 case ProvisioningResult::CLOUD_PROVISION_FLOW_TIMEOUT: | 340 case ProvisioningResult::CLOUD_PROVISION_FLOW_TIMEOUT: |
341 case ProvisioningResult::CLOUD_PROVISION_FLOW_INTERNAL_ERROR: | 341 case ProvisioningResult::CLOUD_PROVISION_FLOW_INTERNAL_ERROR: |
342 error = ArcSupportHost::Error::SIGN_IN_CLOUD_PROVISION_FLOW_FAIL_ERROR; | 342 error = ArcSupportHost::Error::SIGN_IN_CLOUD_PROVISION_FLOW_FAIL_ERROR; |
343 break; | 343 break; |
344 case ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR: | 344 case ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR: |
345 error = ArcSupportHost::Error::SERVER_COMMUNICATION_ERROR; | 345 error = ArcSupportHost::Error::SERVER_COMMUNICATION_ERROR; |
346 break; | 346 break; |
| 347 case ProvisioningResult::NO_NETWORK_CONNECTION: |
| 348 // TODO(khmel): Use explicit error for M58+ builds. |
| 349 error = ArcSupportHost::Error::SIGN_IN_SERVICE_UNAVAILABLE_ERROR; |
| 350 break; |
347 default: | 351 default: |
348 error = ArcSupportHost::Error::SIGN_IN_UNKNOWN_ERROR; | 352 error = ArcSupportHost::Error::SIGN_IN_UNKNOWN_ERROR; |
349 break; | 353 break; |
350 } | 354 } |
351 | 355 |
352 if (result == ProvisioningResult::ARC_STOPPED || | 356 if (result == ProvisioningResult::ARC_STOPPED || |
353 result == ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR) { | 357 result == ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR) { |
354 if (profile_->GetPrefs()->HasPrefPath(prefs::kArcSignedIn)) | 358 if (profile_->GetPrefs()->HasPrefPath(prefs::kArcSignedIn)) |
355 profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, false); | 359 profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, false); |
356 ShutdownSession(); | 360 ShutdownSession(); |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 | 1004 |
1001 #undef MAP_STATE | 1005 #undef MAP_STATE |
1002 | 1006 |
1003 // Some compilers report an error even if all values of an enum-class are | 1007 // Some compilers report an error even if all values of an enum-class are |
1004 // covered exhaustively in a switch statement. | 1008 // covered exhaustively in a switch statement. |
1005 NOTREACHED() << "Invalid value " << static_cast<int>(state); | 1009 NOTREACHED() << "Invalid value " << static_cast<int>(state); |
1006 return os; | 1010 return os; |
1007 } | 1011 } |
1008 | 1012 |
1009 } // namespace arc | 1013 } // namespace arc |
OLD | NEW |