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

Unified Diff: chromeos/network/network_connection_handler.cc

Issue 23701015: Merge 220596 "Differentiate between 'connect-failed' and 'bad-pa..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1599/src/
Patch Set: Created 7 years, 3 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
« no previous file with comments | « chromeos/network/network_connection_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_connection_handler.cc
===================================================================
--- chromeos/network/network_connection_handler.cc (revision 221717)
+++ chromeos/network/network_connection_handler.cc (working copy)
@@ -118,16 +118,10 @@
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 @@
if (check_error_state) {
const std::string& error = network->error();
- if (error == flimflam::kErrorConnectFailed) {
- 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)) {
@@ -401,7 +389,7 @@
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.
@@ -574,7 +562,7 @@
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);
}
@@ -614,7 +602,7 @@
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)
« no previous file with comments | « chromeos/network/network_connection_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698