| OLD | NEW |
| 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 "chrome/browser/chromeos/cros/network_library.h" | 5 #include "chrome/browser/chromeos/cros/network_library.h" |
| 6 | 6 |
| 7 #include "base/chromeos/chromeos_version.h" | 7 #include "base/chromeos/chromeos_version.h" |
| 8 #include "base/i18n/icu_encoding_detection.h" | 8 #include "base/i18n/icu_encoding_detection.h" |
| 9 #include "base/i18n/icu_string_conversions.h" | 9 #include "base/i18n/icu_string_conversions.h" |
| 10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 } | 417 } |
| 418 | 418 |
| 419 void Network::AttemptConnection(const base::Closure& closure) { | 419 void Network::AttemptConnection(const base::Closure& closure) { |
| 420 // By default, just invoke the closure right away. Some subclasses | 420 // By default, just invoke the closure right away. Some subclasses |
| 421 // (Wifi, VPN, etc.) override to do more work. | 421 // (Wifi, VPN, etc.) override to do more work. |
| 422 closure.Run(); | 422 closure.Run(); |
| 423 } | 423 } |
| 424 | 424 |
| 425 void Network::set_connecting() { | 425 void Network::set_connecting() { |
| 426 state_ = STATE_CONNECT_REQUESTED; | 426 state_ = STATE_CONNECT_REQUESTED; |
| 427 // Set the connecting network in NetworkStateHandler for the status area UI. | |
| 428 if (NetworkHandler::IsInitialized()) { | |
| 429 NetworkHandler::Get()->network_state_handler()-> | |
| 430 SetConnectingNetwork(service_path()); | |
| 431 } | |
| 432 } | 427 } |
| 433 | 428 |
| 434 void Network::SetProfilePath(const std::string& profile_path) { | 429 void Network::SetProfilePath(const std::string& profile_path) { |
| 435 VLOG(1) << "Setting profile for: " << name_ << " to: " << profile_path; | 430 VLOG(1) << "Setting profile for: " << name_ << " to: " << profile_path; |
| 436 SetOrClearStringProperty( | 431 SetOrClearStringProperty( |
| 437 flimflam::kProfileProperty, profile_path, &profile_path_); | 432 flimflam::kProfileProperty, profile_path, &profile_path_); |
| 438 } | 433 } |
| 439 | 434 |
| 440 std::string Network::GetStateString() const { | 435 std::string Network::GetStateString() const { |
| 441 return ConnectionStateString(state_); | 436 return ConnectionStateString(state_); |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1391 } | 1386 } |
| 1392 | 1387 |
| 1393 // static | 1388 // static |
| 1394 void NetworkLibrary::SetForTesting(NetworkLibrary* library) { | 1389 void NetworkLibrary::SetForTesting(NetworkLibrary* library) { |
| 1395 if (g_network_library) | 1390 if (g_network_library) |
| 1396 delete g_network_library; | 1391 delete g_network_library; |
| 1397 g_network_library = library; | 1392 g_network_library = library; |
| 1398 } | 1393 } |
| 1399 | 1394 |
| 1400 } // namespace chromeos | 1395 } // namespace chromeos |
| OLD | NEW |