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

Side by Side Diff: ash/system/chromeos/network/network_state_notifier.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 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_connect.h" 8 #include "ash/system/chromeos/network/network_connect.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 24 matching lines...) Expand all
35 35
36 const int kMinTimeBetweenOutOfCreditsNotifySeconds = 10 * 60; 36 const int kMinTimeBetweenOutOfCreditsNotifySeconds = 10 * 60;
37 37
38 // Error messages based on |error_name|, not network_state->error(). 38 // Error messages based on |error_name|, not network_state->error().
39 string16 GetConnectErrorString(const std::string& error_name) { 39 string16 GetConnectErrorString(const std::string& error_name) {
40 if (error_name == NetworkConnectionHandler::kErrorNotFound) 40 if (error_name == NetworkConnectionHandler::kErrorNotFound)
41 return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_CONNECT_FAILED); 41 return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_CONNECT_FAILED);
42 if (error_name == NetworkConnectionHandler::kErrorConfigureFailed) 42 if (error_name == NetworkConnectionHandler::kErrorConfigureFailed)
43 return l10n_util::GetStringUTF16( 43 return l10n_util::GetStringUTF16(
44 IDS_CHROMEOS_NETWORK_ERROR_CONFIGURE_FAILED); 44 IDS_CHROMEOS_NETWORK_ERROR_CONFIGURE_FAILED);
45 if (error_name == NetworkConnectionHandler::kErrorActivateFailed) 45 if (error_name == ash::network_connect::kErrorActivateFailed)
46 return l10n_util::GetStringUTF16( 46 return l10n_util::GetStringUTF16(
47 IDS_CHROMEOS_NETWORK_ERROR_ACTIVATION_FAILED); 47 IDS_CHROMEOS_NETWORK_ERROR_ACTIVATION_FAILED);
48 return string16(); 48 return string16();
49 } 49 }
50 50
51 void ShowErrorNotification(const std::string& notification_id, 51 void ShowErrorNotification(const std::string& notification_id,
52 const std::string& network_type, 52 const std::string& network_type,
53 const base::string16& title, 53 const base::string16& title,
54 const base::string16& message, 54 const base::string16& message,
55 const base::Closure& callback) { 55 const base::Closure& callback) {
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 263
264 ShowErrorNotification( 264 ShowErrorNotification(
265 network_connect::kNetworkConnectNotificationId, 265 network_connect::kNetworkConnectNotificationId,
266 network_type, 266 network_type,
267 l10n_util::GetStringUTF16(IDS_NETWORK_CONNECTION_ERROR_TITLE), 267 l10n_util::GetStringUTF16(IDS_NETWORK_CONNECTION_ERROR_TITLE),
268 error_msg, 268 error_msg,
269 base::Bind(&network_connect::ShowNetworkSettings, service_path)); 269 base::Bind(&network_connect::ShowNetworkSettings, service_path));
270 } 270 }
271 271
272 } // namespace ash 272 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698