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

Unified Diff: ash/system/chromeos/network/network_connect.cc

Issue 22867045: Differentiate between 'connect-failed' and 'bad-passphrase' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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: ash/system/chromeos/network/network_connect.cc
diff --git a/ash/system/chromeos/network/network_connect.cc b/ash/system/chromeos/network/network_connect.cc
index 0e5356958ac2942c251bf84d35ff66f88541adfc..3002856f25c3002af961b850cbc7abc562dbb56e 100644
--- a/ash/system/chromeos/network/network_connect.cc
+++ b/ash/system/chromeos/network/network_connect.cc
@@ -75,7 +75,8 @@ void OnConnectFailed(const std::string& service_path,
if (error_name == NetworkConnectionHandler::kErrorConnectCanceled)
return;
- if (error_name == NetworkConnectionHandler::kErrorPassphraseRequired ||
+ if (error_name == flimflam::kErrorBadPassphrase ||
+ error_name == NetworkConnectionHandler::kErrorPassphraseRequired ||
error_name == NetworkConnectionHandler::kErrorConfigurationRequired ||
error_name == NetworkConnectionHandler::kErrorAuthenticationRequired) {
ash::Shell::GetInstance()->system_tray_delegate()->ConfigureNetwork(
@@ -104,7 +105,7 @@ void OnConnectFailed(const std::string& service_path,
ShowErrorNotification(error_name, service_path);
// Show a configure dialog for ConnectFailed errors.
- if (error_name != NetworkConnectionHandler::kErrorConnectFailed)
+ if (error_name != flimflam::kErrorConnectFailed)
return;
// If Shill reports an InProgress error, don't try to configure the network.
@@ -147,11 +148,10 @@ void CallConnectToNetwork(const std::string& service_path,
}
void OnActivateFailed(const std::string& service_path,
- const std::string& error_name,
+ const std::string& error_name,
scoped_ptr<base::DictionaryValue> error_data) {
NET_LOG_ERROR("Unable to activate network", service_path);
- ShowErrorNotification(
- NetworkConnectionHandler::kErrorActivateFailed, service_path);
+ ShowErrorNotification(network_connect::kErrorActivateFailed, service_path);
}
void OnActivateSucceeded(const std::string& service_path) {
@@ -261,6 +261,8 @@ const char kNetworkConnectNotificationId[] =
const char kNetworkActivateNotificationId[] =
"chrome://settings/internet/activate";
+const char kErrorActivateFailed[] = "activate-failed";
+
void ConnectToNetwork(const std::string& service_path,
gfx::NativeWindow owning_window) {
NET_LOG_USER("ConnectToNetwork", service_path);
« no previous file with comments | « ash/system/chromeos/network/network_connect.h ('k') | ash/system/chromeos/network/network_state_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698