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 985a264e493b64a7629a850cd6e6550c49065dd4..a6b4d3bc62db6b60a3cf140ffb3b962a04a3c454 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" |
@@ -1276,7 +1277,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, |
@@ -1520,7 +1522,17 @@ 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( |
+ pairing_chromeos::HostPairingController::NETWORK_ERROR, error_message); |
+ |
remora_controller_->OnNetworkConnectivityChanged( |
pairing_chromeos::HostPairingController::CONNECTIVITY_NONE); |
} |