OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/network_login_observer.h" | 5 #include "chrome/browser/chromeos/network_login_observer.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/cros/cros_library.h" | 7 #include "chrome/browser/chromeos/cros/cros_library.h" |
8 #include "chrome/browser/chromeos/cros/network_library.h" | 8 #include "chrome/browser/chromeos/cros/network_library.h" |
9 #include "chrome/browser/chromeos/login/background_view.h" | 9 #include "chrome/browser/chromeos/login/background_view.h" |
10 #include "chrome/browser/chromeos/login/login_utils.h" | 10 #include "chrome/browser/chromeos/login/login_utils.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 CreateModalPopup(new NetworkConfigView(wifi)); | 63 CreateModalPopup(new NetworkConfigView(wifi)); |
64 return; // Only support one failure per notification. | 64 return; // Only support one failure per notification. |
65 } | 65 } |
66 } | 66 } |
67 } | 67 } |
68 // Check to see if we have any newly failed virtual network. | 68 // Check to see if we have any newly failed virtual network. |
69 for (VirtualNetworkVector::const_iterator it = virtual_networks.begin(); | 69 for (VirtualNetworkVector::const_iterator it = virtual_networks.begin(); |
70 it != virtual_networks.end(); it++) { | 70 it != virtual_networks.end(); it++) { |
71 VirtualNetwork* vpn = *it; | 71 VirtualNetwork* vpn = *it; |
72 if (vpn->notify_failure()) { | 72 if (vpn->notify_failure()) { |
73 // Display login dialog again for bad_passphrase and errors. | 73 // Display login dialog for bad_passphrase or connect_failed. VPN does |
| 74 // not store user name or other properties, so may need additional info |
| 75 // for a configured network. |
74 // Always re-display the login dialog for newly added networks. | 76 // Always re-display the login dialog for newly added networks. |
75 if (vpn->error() == ERROR_BAD_PASSPHRASE || vpn->added()) { | 77 if (vpn->error() == ERROR_BAD_PASSPHRASE || |
| 78 vpn->error() == ERROR_CONNECT_FAILED || |
| 79 vpn->added()) { |
76 CreateModalPopup(new NetworkConfigView(vpn)); | 80 CreateModalPopup(new NetworkConfigView(vpn)); |
77 return; // Only support one failure per notification. | 81 return; // Only support one failure per notification. |
78 } | 82 } |
79 } | 83 } |
80 } | 84 } |
81 } | 85 } |
82 | 86 |
83 } // namespace chromeos | 87 } // namespace chromeos |
OLD | NEW |