Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Unified Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 2890383003: Bootstrapping: Send meaningful error code/message from Slave to Master (Closed)
Patch Set: Address achuith@'s comments. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.h ('k') | components/pairing/bluetooth_host_pairing_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698