Index: chrome/browser/chromeos/login/wizard_controller.cc |
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc |
index f775eefa694336e36a0a0da73e022e63f543ed87..f19f5226a3780215b19d15681c5421094d0cd6db 100644 |
--- a/chrome/browser/chromeos/login/wizard_controller.cc |
+++ b/chrome/browser/chromeos/login/wizard_controller.cc |
@@ -15,6 +15,7 @@ |
#include "base/bind.h" |
#include "base/callback_helpers.h" |
#include "base/command_line.h" |
+#include "base/json/json_string_value_serializer.h" |
#include "base/location.h" |
#include "base/logging.h" |
#include "base/macros.h" |
@@ -1317,7 +1318,8 @@ void WizardController::AddNetworkRequested(const std::string& onc_spec) { |
if (NetworkAllowUpdate(network_state)) { |
network_screen->CreateAndConnectNetworkFromOnc( |
- onc_spec, base::Bind(&base::DoNothing), base::Bind(&base::DoNothing)); |
+ onc_spec, base::Bind(&base::DoNothing), |
+ network_handler::ErrorCallback()); |
} else { |
network_screen->CreateAndConnectNetworkFromOnc( |
onc_spec, base::Bind(&WizardController::OnSetHostNetworkSuccessful, |
@@ -1617,7 +1619,19 @@ void WizardController::OnSetHostNetworkSuccessful() { |
InitiateOOBEUpdate(); |
} |
-void WizardController::OnSetHostNetworkFailed() { |
+void WizardController::OnSetHostNetworkFailed( |
+ const std::string& error_name, |
+ std::unique_ptr<base::DictionaryValue> error_data) { |
+ std::string error_message; |
+ JSONStringValueSerializer serializer(&error_message); |
+ serializer.Serialize(*error_data); |
+ error_message = error_name + ": " + error_message; |
+ |
+ remora_controller_->SetErrorCodeAndMessage( |
+ static_cast<int>( |
+ pairing_chromeos::HostPairingController::ErrorCode::NETWORK_ERROR), |
+ error_message); |
+ |
remora_controller_->OnNetworkConnectivityChanged( |
pairing_chromeos::HostPairingController::CONNECTIVITY_NONE); |
} |