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

Side by Side Diff: ash/system/chromeos/network/network_state_notifier.cc

Issue 16512003: Configure networks requiring a certificate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Apply Feedback Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/chromeos/network/network_state_notifier.h" 5 #include "ash/system/chromeos/network/network_state_notifier.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/chromeos/network/network_observer.h" 8 #include "ash/system/chromeos/network/network_observer.h"
9 #include "ash/system/tray/system_tray_notifier.h" 9 #include "ash/system/tray/system_tray_notifier.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 IDS_CHROMEOS_NETWORK_ERROR_DNS_LOOKUP_FAILED); 73 IDS_CHROMEOS_NETWORK_ERROR_DNS_LOOKUP_FAILED);
74 } 74 }
75 if (error == flimflam::kErrorHTTPGetFailed) { 75 if (error == flimflam::kErrorHTTPGetFailed) {
76 return l10n_util::GetStringUTF16( 76 return l10n_util::GetStringUTF16(
77 IDS_CHROMEOS_NETWORK_ERROR_HTTP_GET_FAILED); 77 IDS_CHROMEOS_NETWORK_ERROR_HTTP_GET_FAILED);
78 } 78 }
79 if (error == flimflam::kErrorIpsecPskAuthFailed) { 79 if (error == flimflam::kErrorIpsecPskAuthFailed) {
80 return l10n_util::GetStringUTF16( 80 return l10n_util::GetStringUTF16(
81 IDS_CHROMEOS_NETWORK_ERROR_IPSEC_PSK_AUTH_FAILED); 81 IDS_CHROMEOS_NETWORK_ERROR_IPSEC_PSK_AUTH_FAILED);
82 } 82 }
83 if (error == flimflam::kErrorIpsecCertAuthFailed) { 83 if (error == flimflam::kErrorIpsecCertAuthFailed ||
84 error == shill::kErrorEapAuthenticationFailed ||
85 error == shill::kErrorEapLocalTlsFailed ||
86 error == shill::kErrorEapRemoteTlsFailed) {
84 return l10n_util::GetStringUTF16( 87 return l10n_util::GetStringUTF16(
85 IDS_CHROMEOS_NETWORK_ERROR_IPSEC_CERT_AUTH_FAILED); 88 IDS_CHROMEOS_NETWORK_ERROR_CERT_AUTH_FAILED);
86 } 89 }
87 if (error == flimflam::kErrorPppAuthFailed) { 90 if (error == flimflam::kErrorPppAuthFailed) {
88 return l10n_util::GetStringUTF16( 91 return l10n_util::GetStringUTF16(
89 IDS_CHROMEOS_NETWORK_ERROR_PPP_AUTH_FAILED); 92 IDS_CHROMEOS_NETWORK_ERROR_PPP_AUTH_FAILED);
90 } 93 }
94
91 if (StringToLowerASCII(error) == 95 if (StringToLowerASCII(error) ==
92 StringToLowerASCII(std::string(flimflam::kUnknownString))) { 96 StringToLowerASCII(std::string(flimflam::kUnknownString))) {
93 return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_UNKNOWN); 97 return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_UNKNOWN);
94 } 98 }
95 return l10n_util::GetStringFUTF16(IDS_NETWORK_UNRECOGNIZED_ERROR, 99 return l10n_util::GetStringFUTF16(IDS_NETWORK_UNRECOGNIZED_ERROR,
96 UTF8ToUTF16(error)); 100 UTF8ToUTF16(error));
97 } 101 }
98 102
99 } // namespace 103 } // namespace
100 104
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 VLOG(2) << " Network: " << network->path(); 250 VLOG(2) << " Network: " << network->path();
247 cached_state_[network->path()] = network->connection_state(); 251 cached_state_[network->path()] = network->connection_state();
248 } 252 }
249 const NetworkState* default_network = 253 const NetworkState* default_network =
250 NetworkHandler::Get()->network_state_handler()->DefaultNetwork(); 254 NetworkHandler::Get()->network_state_handler()->DefaultNetwork();
251 if (default_network && default_network->IsConnectedState()) 255 if (default_network && default_network->IsConnectedState())
252 last_active_network_ = default_network->path(); 256 last_active_network_ = default_network->path();
253 } 257 }
254 258
255 } // namespace ash 259 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698