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/login/network_screen.h" | 5 #include "chrome/browser/chromeos/login/network_screen.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/chromeos/cros/cros_library.h" | 10 #include "chrome/browser/chromeos/cros/cros_library.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 connection_timer_.Stop(); | 163 connection_timer_.Stop(); |
164 | 164 |
165 network_id_ = network_id; | 165 network_id_ = network_id; |
166 actor_->ShowConnectingStatus(false, network_id_); | 166 actor_->ShowConnectingStatus(false, network_id_); |
167 actor_->EnableContinue(is_connected); | 167 actor_->EnableContinue(is_connected); |
168 } | 168 } |
169 | 169 |
170 void NetworkScreen::WaitForConnection(const string16& network_id) { | 170 void NetworkScreen::WaitForConnection(const string16& network_id) { |
171 if (network_id_ != network_id || !connection_timer_.IsRunning()) { | 171 if (network_id_ != network_id || !connection_timer_.IsRunning()) { |
172 connection_timer_.Stop(); | 172 connection_timer_.Stop(); |
173 connection_timer_.Start(base::TimeDelta::FromSeconds(kConnectionTimeoutSec), | 173 connection_timer_.Start(FROM_HERE, |
| 174 base::TimeDelta::FromSeconds(kConnectionTimeoutSec), |
174 this, | 175 this, |
175 &NetworkScreen::OnConnectionTimeout); | 176 &NetworkScreen::OnConnectionTimeout); |
176 } | 177 } |
177 | 178 |
178 network_id_ = network_id; | 179 network_id_ = network_id; |
179 actor_->ShowConnectingStatus(continue_pressed_, network_id_); | 180 actor_->ShowConnectingStatus(continue_pressed_, network_id_); |
180 | 181 |
181 actor_->EnableContinue(false); | 182 actor_->EnableContinue(false); |
182 } | 183 } |
183 | 184 |
184 } // namespace chromeos | 185 } // namespace chromeos |
OLD | NEW |