| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/login/network_screen.h" | 5 #include "chrome/browser/chromeos/login/network_screen.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 } | 154 } |
| 155 | 155 |
| 156 void NetworkScreen::UpdateStatus(NetworkLibrary* network) { | 156 void NetworkScreen::UpdateStatus(NetworkLibrary* network) { |
| 157 if (!view() || !network) | 157 if (!view() || !network) |
| 158 return; | 158 return; |
| 159 | 159 |
| 160 if (network->ethernet_connected()) { | 160 if (network->ethernet_connected()) { |
| 161 StopWaitingForConnection( | 161 StopWaitingForConnection( |
| 162 l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET)); | 162 l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET)); |
| 163 } else if (network->wifi_connected()) { | 163 } else if (network->wifi_connected()) { |
| 164 StopWaitingForConnection(ASCIIToUTF16(network->wifi_name())); | 164 StopWaitingForConnection(ASCIIToUTF16(network->wifi_network().name())); |
| 165 } else if (network->cellular_connected()) { | 165 } else if (network->cellular_connected()) { |
| 166 StopWaitingForConnection(ASCIIToUTF16(network->cellular_name())); | 166 StopWaitingForConnection(ASCIIToUTF16(network->cellular_network().name())); |
| 167 } else if (network->ethernet_connecting()) { | 167 } else if (network->ethernet_connecting()) { |
| 168 WaitForConnection( | 168 WaitForConnection( |
| 169 l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET)); | 169 l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET)); |
| 170 } else if (network->wifi_connecting()) { | 170 } else if (network->wifi_connecting()) { |
| 171 WaitForConnection(ASCIIToUTF16(network->wifi_name())); | 171 WaitForConnection(ASCIIToUTF16(network->wifi_network().name())); |
| 172 } else if (network->cellular_connecting()) { | 172 } else if (network->cellular_connecting()) { |
| 173 WaitForConnection(ASCIIToUTF16(network->cellular_name())); | 173 WaitForConnection(ASCIIToUTF16(network->cellular_network().name())); |
| 174 } else { | 174 } else { |
| 175 StopWaitingForConnection(network_id_); | 175 StopWaitingForConnection(network_id_); |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 | 178 |
| 179 void NetworkScreen::StopWaitingForConnection(const string16& network_id) { | 179 void NetworkScreen::StopWaitingForConnection(const string16& network_id) { |
| 180 NetworkLibrary* network = CrosLibrary::Get()->GetNetworkLibrary(); | 180 NetworkLibrary* network = CrosLibrary::Get()->GetNetworkLibrary(); |
| 181 bool is_connected = network && network->Connected(); | 181 bool is_connected = network && network->Connected(); |
| 182 if (is_connected && continue_pressed_) { | 182 if (is_connected && continue_pressed_) { |
| 183 NotifyOnConnection(); | 183 NotifyOnConnection(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 200 &NetworkScreen::OnConnectionTimeout); | 200 &NetworkScreen::OnConnectionTimeout); |
| 201 } | 201 } |
| 202 | 202 |
| 203 network_id_ = network_id; | 203 network_id_ = network_id; |
| 204 view()->ShowConnectingStatus(continue_pressed_, network_id_); | 204 view()->ShowConnectingStatus(continue_pressed_, network_id_); |
| 205 | 205 |
| 206 view()->EnableContinue(false); | 206 view()->EnableContinue(false); |
| 207 } | 207 } |
| 208 | 208 |
| 209 } // namespace chromeos | 209 } // namespace chromeos |
| OLD | NEW |