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

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: Rebase 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 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/system_notifier.h" 9 #include "ash/system/system_notifier.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
(...skipping 25 matching lines...) Expand all
36 36
37 const int kMinTimeBetweenOutOfCreditsNotifySeconds = 10 * 60; 37 const int kMinTimeBetweenOutOfCreditsNotifySeconds = 10 * 60;
38 38
39 // Error messages based on |error_name|, not network_state->error(). 39 // Error messages based on |error_name|, not network_state->error().
40 string16 GetConnectErrorString(const std::string& error_name) { 40 string16 GetConnectErrorString(const std::string& error_name) {
41 if (error_name == NetworkConnectionHandler::kErrorNotFound) 41 if (error_name == NetworkConnectionHandler::kErrorNotFound)
42 return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_CONNECT_FAILED); 42 return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_CONNECT_FAILED);
43 if (error_name == NetworkConnectionHandler::kErrorConfigureFailed) 43 if (error_name == NetworkConnectionHandler::kErrorConfigureFailed)
44 return l10n_util::GetStringUTF16( 44 return l10n_util::GetStringUTF16(
45 IDS_CHROMEOS_NETWORK_ERROR_CONFIGURE_FAILED); 45 IDS_CHROMEOS_NETWORK_ERROR_CONFIGURE_FAILED);
46 if (error_name == NetworkConnectionHandler::kErrorActivateFailed) 46 if (error_name == ash::network_connect::kErrorActivateFailed)
47 return l10n_util::GetStringUTF16( 47 return l10n_util::GetStringUTF16(
48 IDS_CHROMEOS_NETWORK_ERROR_ACTIVATION_FAILED); 48 IDS_CHROMEOS_NETWORK_ERROR_ACTIVATION_FAILED);
49 return string16(); 49 return string16();
50 } 50 }
51 51
52 void ShowErrorNotification(const std::string& notification_id, 52 void ShowErrorNotification(const std::string& notification_id,
53 const std::string& network_type, 53 const std::string& network_type,
54 const base::string16& title, 54 const base::string16& title,
55 const base::string16& message, 55 const base::string16& message,
56 const base::Closure& callback) { 56 const base::Closure& callback) {
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 ShowErrorNotification( 271 ShowErrorNotification(
272 network_connect::kNetworkConnectNotificationId, 272 network_connect::kNetworkConnectNotificationId,
273 network_type, 273 network_type,
274 l10n_util::GetStringUTF16(IDS_NETWORK_CONNECTION_ERROR_TITLE), 274 l10n_util::GetStringUTF16(IDS_NETWORK_CONNECTION_ERROR_TITLE),
275 error_msg, 275 error_msg,
276 base::Bind(&network_connect::ShowNetworkSettings, service_path)); 276 base::Bind(&network_connect::ShowNetworkSettings, service_path));
277 } 277 }
278 278
279 } // namespace ash 279 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/network/network_connect.cc ('k') | chromeos/network/network_connection_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698