| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_auth_service.h" | 5 #include "chrome/browser/chromeos/arc/arc_auth_service.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 MAP_PROVISIONING_RESULT(DEVICE_CHECK_IN_INTERNAL_ERROR); | 46 MAP_PROVISIONING_RESULT(DEVICE_CHECK_IN_INTERNAL_ERROR); |
| 47 MAP_PROVISIONING_RESULT(GMS_NETWORK_ERROR); | 47 MAP_PROVISIONING_RESULT(GMS_NETWORK_ERROR); |
| 48 MAP_PROVISIONING_RESULT(GMS_SERVICE_UNAVAILABLE); | 48 MAP_PROVISIONING_RESULT(GMS_SERVICE_UNAVAILABLE); |
| 49 MAP_PROVISIONING_RESULT(GMS_BAD_AUTHENTICATION); | 49 MAP_PROVISIONING_RESULT(GMS_BAD_AUTHENTICATION); |
| 50 MAP_PROVISIONING_RESULT(GMS_SIGN_IN_FAILED); | 50 MAP_PROVISIONING_RESULT(GMS_SIGN_IN_FAILED); |
| 51 MAP_PROVISIONING_RESULT(GMS_SIGN_IN_TIMEOUT); | 51 MAP_PROVISIONING_RESULT(GMS_SIGN_IN_TIMEOUT); |
| 52 MAP_PROVISIONING_RESULT(GMS_SIGN_IN_INTERNAL_ERROR); | 52 MAP_PROVISIONING_RESULT(GMS_SIGN_IN_INTERNAL_ERROR); |
| 53 MAP_PROVISIONING_RESULT(CLOUD_PROVISION_FLOW_FAILED); | 53 MAP_PROVISIONING_RESULT(CLOUD_PROVISION_FLOW_FAILED); |
| 54 MAP_PROVISIONING_RESULT(CLOUD_PROVISION_FLOW_TIMEOUT); | 54 MAP_PROVISIONING_RESULT(CLOUD_PROVISION_FLOW_TIMEOUT); |
| 55 MAP_PROVISIONING_RESULT(CLOUD_PROVISION_FLOW_INTERNAL_ERROR); | 55 MAP_PROVISIONING_RESULT(CLOUD_PROVISION_FLOW_INTERNAL_ERROR); |
| 56 MAP_PROVISIONING_RESULT(NO_NETWORK_CONNECTION); |
| 56 } | 57 } |
| 57 #undef MAP_PROVISIONING_RESULT | 58 #undef MAP_PROVISIONING_RESULT |
| 58 | 59 |
| 59 NOTREACHED() << "unknown reason: " << static_cast<int>(reason); | 60 NOTREACHED() << "unknown reason: " << static_cast<int>(reason); |
| 60 return ProvisioningResult::UNKNOWN_ERROR; | 61 return ProvisioningResult::UNKNOWN_ERROR; |
| 61 } | 62 } |
| 62 | 63 |
| 63 mojom::ChromeAccountType GetAccountType() { | 64 mojom::ChromeAccountType GetAccountType() { |
| 64 return ArcSessionManager::IsArcKioskMode() | 65 return ArcSessionManager::IsArcKioskMode() |
| 65 ? mojom::ChromeAccountType::ROBOT_ACCOUNT | 66 ? mojom::ChromeAccountType::ROBOT_ACCOUNT |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 } | 281 } |
| 281 | 282 |
| 282 notifier_->Notify( | 283 notifier_->Notify( |
| 283 !ArcSessionManager::IsOptInVerificationDisabled(), auth_code, | 284 !ArcSessionManager::IsOptInVerificationDisabled(), auth_code, |
| 284 GetAccountType(), | 285 GetAccountType(), |
| 285 policy_util::IsAccountManaged(ArcSessionManager::Get()->profile())); | 286 policy_util::IsAccountManaged(ArcSessionManager::Get()->profile())); |
| 286 notifier_.reset(); | 287 notifier_.reset(); |
| 287 } | 288 } |
| 288 | 289 |
| 289 } // namespace arc | 290 } // namespace arc |
| OLD | NEW |