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/i18n/icu_encoding_detection.h" | 7 #include "base/i18n/icu_encoding_detection.h" |
8 #include "base/i18n/icu_string_conversions.h" | 8 #include "base/i18n/icu_string_conversions.h" |
9 #include "base/i18n/time_formatting.h" | 9 #include "base/i18n/time_formatting.h" |
10 #include "base/json/json_writer.h" // for debug output only. | 10 #include "base/json/json_writer.h" // for debug output only. |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 | 443 |
444 void Network::AttemptConnection(const base::Closure& closure) { | 444 void Network::AttemptConnection(const base::Closure& closure) { |
445 // By default, just invoke the closure right away. Some subclasses | 445 // By default, just invoke the closure right away. Some subclasses |
446 // (Wifi, VPN, etc.) override to do more work. | 446 // (Wifi, VPN, etc.) override to do more work. |
447 closure.Run(); | 447 closure.Run(); |
448 } | 448 } |
449 | 449 |
450 void Network::set_connecting() { | 450 void Network::set_connecting() { |
451 state_ = STATE_CONNECT_REQUESTED; | 451 state_ = STATE_CONNECT_REQUESTED; |
452 // Set the connecting network in NetworkStateHandler for the status area UI. | 452 // Set the connecting network in NetworkStateHandler for the status area UI. |
453 if (NetworkStateHandler::IsInitialized()) | 453 NetworkHandler::Get()->network_state_handler()-> |
454 NetworkStateHandler::Get()->SetConnectingNetwork(service_path()); | 454 SetConnectingNetwork(service_path()); |
455 } | 455 } |
456 | 456 |
457 void Network::SetProfilePath(const std::string& profile_path) { | 457 void Network::SetProfilePath(const std::string& profile_path) { |
458 VLOG(1) << "Setting profile for: " << name_ << " to: " << profile_path; | 458 VLOG(1) << "Setting profile for: " << name_ << " to: " << profile_path; |
459 SetOrClearStringProperty( | 459 SetOrClearStringProperty( |
460 flimflam::kProfileProperty, profile_path, &profile_path_); | 460 flimflam::kProfileProperty, profile_path, &profile_path_); |
461 } | 461 } |
462 | 462 |
463 std::string Network::GetStateString() const { | 463 std::string Network::GetStateString() const { |
464 return ConnectionStateString(state_); | 464 return ConnectionStateString(state_); |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 NetworkLibrary* impl; | 1374 NetworkLibrary* impl; |
1375 if (stub) | 1375 if (stub) |
1376 impl = new NetworkLibraryImplStub(); | 1376 impl = new NetworkLibraryImplStub(); |
1377 else | 1377 else |
1378 impl = new NetworkLibraryImplCros(); | 1378 impl = new NetworkLibraryImplCros(); |
1379 impl->Init(); | 1379 impl->Init(); |
1380 return impl; | 1380 return impl; |
1381 } | 1381 } |
1382 | 1382 |
1383 } // namespace chromeos | 1383 } // namespace chromeos |
OLD | NEW |