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

Unified Diff: chromeos/network/network_connection_handler.cc

Issue 22867045: Differentiate between 'connect-failed' and 'bad-passphrase' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 4 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: chromeos/network/network_connection_handler.cc
diff --git a/chromeos/network/network_connection_handler.cc b/chromeos/network/network_connection_handler.cc
index f27ff4f8a1a25e74cc6bb8cbc03744a3d91d7d5f..35ba30a820497436d6cc455800d7dc8a0e9fc682 100644
--- a/chromeos/network/network_connection_handler.cc
+++ b/chromeos/network/network_connection_handler.cc
@@ -118,16 +118,10 @@ const char NetworkConnectionHandler::kErrorConfigurationRequired[] =
const char NetworkConnectionHandler::kErrorAuthenticationRequired[] =
"authentication-required";
const char NetworkConnectionHandler::kErrorShillError[] = "shill-error";
-const char NetworkConnectionHandler::kErrorConnectFailed[] = "connect-failed";
const char NetworkConnectionHandler::kErrorConfigureFailed[] =
"configure-failed";
-const char NetworkConnectionHandler::kErrorActivateFailed[] =
- "activate-failed";
-const char NetworkConnectionHandler::kErrorMissingProvider[] =
- "missing-provider";
const char NetworkConnectionHandler::kErrorConnectCanceled[] =
"connect-canceled";
-const char NetworkConnectionHandler::kErrorUnknown[] = "unknown-error";
struct NetworkConnectionHandler::ConnectRequest {
ConnectRequest(const std::string& service_path,
@@ -254,14 +248,8 @@ void NetworkConnectionHandler::ConnectToNetwork(
if (check_error_state) {
const std::string& error = network->error();
- if (error == flimflam::kErrorConnectFailed) {
pneubeck (no reviews) 2013/08/26 08:14:11 for non-VPN this looks fine, as it's handled later
stevenjb 2013/08/27 15:52:08 The purpose of this code was to try to guess the u
pneubeck (no reviews) 2013/08/28 10:02:35 My bad.. I should have placed this comment to the
- InvokeErrorCallback(
- service_path, error_callback, kErrorPassphraseRequired);
- return;
- }
if (error == flimflam::kErrorBadPassphrase) {
- InvokeErrorCallback(
- service_path, error_callback, kErrorPassphraseRequired);
+ InvokeErrorCallback(service_path, error_callback, error);
return;
}
if (IsAuthenticationError(error)) {
@@ -405,7 +393,7 @@ void NetworkConnectionHandler::VerifyConfiguredAndConnect(
flimflam::kHostProperty, &vpn_provider_host);
}
if (vpn_provider_type.empty() || vpn_provider_host.empty()) {
- ErrorCallbackForPendingRequest(service_path, kErrorMissingProvider);
+ ErrorCallbackForPendingRequest(service_path, kErrorConfigurationRequired);
return;
}
// VPN requires a host and username to be set.
@@ -578,7 +566,7 @@ void NetworkConnectionHandler::HandleShillConnectFailure(
network_handler::ErrorCallback error_callback = request->error_callback;
pending_requests_.erase(service_path);
network_handler::ShillErrorCallbackFunction(
- kErrorConnectFailed, service_path, error_callback,
+ flimflam::kErrorConnectFailed, service_path, error_callback,
dbus_error_name, dbus_error_message);
}
@@ -618,7 +606,7 @@ void NetworkConnectionHandler::CheckPendingRequest(
error_name = kErrorConnectCanceled;
error_detail = "";
} else {
- error_name = kErrorConnectFailed;
+ error_name = flimflam::kErrorConnectFailed;
error_detail = network->error();
if (error_detail.empty()) {
if (network->connection_state() == flimflam::kStateFailure)

Powered by Google App Engine
This is Rietveld 408576698