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/cros/network_library.h" | 5 #include "chrome/browser/chromeos/cros/network_library.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
(...skipping 3309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3320 ~NetworkLibraryStubImpl() { if (ethernet_) delete ethernet_; } | 3320 ~NetworkLibraryStubImpl() { if (ethernet_) delete ethernet_; } |
3321 virtual void AddNetworkManagerObserver(NetworkManagerObserver* observer) {} | 3321 virtual void AddNetworkManagerObserver(NetworkManagerObserver* observer) {} |
3322 virtual void RemoveNetworkManagerObserver(NetworkManagerObserver* observer) {} | 3322 virtual void RemoveNetworkManagerObserver(NetworkManagerObserver* observer) {} |
3323 virtual void AddNetworkObserver(const std::string& service_path, | 3323 virtual void AddNetworkObserver(const std::string& service_path, |
3324 NetworkObserver* observer) {} | 3324 NetworkObserver* observer) {} |
3325 virtual void RemoveNetworkObserver(const std::string& service_path, | 3325 virtual void RemoveNetworkObserver(const std::string& service_path, |
3326 NetworkObserver* observer) {} | 3326 NetworkObserver* observer) {} |
3327 virtual void RemoveObserverForAllNetworks(NetworkObserver* observer) {} | 3327 virtual void RemoveObserverForAllNetworks(NetworkObserver* observer) {} |
3328 virtual void Lock() {} | 3328 virtual void Lock() {} |
3329 virtual void Unlock() {} | 3329 virtual void Unlock() {} |
3330 virtual bool IsLocked() { return true; } | 3330 virtual bool IsLocked() { return false; } |
3331 virtual void AddCellularDataPlanObserver( | 3331 virtual void AddCellularDataPlanObserver( |
3332 CellularDataPlanObserver* observer) {} | 3332 CellularDataPlanObserver* observer) {} |
3333 virtual void RemoveCellularDataPlanObserver( | 3333 virtual void RemoveCellularDataPlanObserver( |
3334 CellularDataPlanObserver* observer) {} | 3334 CellularDataPlanObserver* observer) {} |
3335 virtual void AddUserActionObserver(UserActionObserver* observer) {} | 3335 virtual void AddUserActionObserver(UserActionObserver* observer) {} |
3336 virtual void RemoveUserActionObserver(UserActionObserver* observer) {} | 3336 virtual void RemoveUserActionObserver(UserActionObserver* observer) {} |
3337 | 3337 |
3338 virtual const EthernetNetwork* ethernet_network() const { | 3338 virtual const EthernetNetwork* ethernet_network() const { |
3339 return ethernet_; | 3339 return ethernet_; |
3340 } | 3340 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3405 const std::string& identity, | 3405 const std::string& identity, |
3406 const std::string& certpath, | 3406 const std::string& certpath, |
3407 bool auto_connect) {} | 3407 bool auto_connect) {} |
3408 virtual void ConnectToCellularNetwork(CellularNetwork* network) {} | 3408 virtual void ConnectToCellularNetwork(CellularNetwork* network) {} |
3409 virtual void SignalCellularPlanPayment() {} | 3409 virtual void SignalCellularPlanPayment() {} |
3410 virtual bool HasRecentCellularPlanPayment() { return false; } | 3410 virtual bool HasRecentCellularPlanPayment() { return false; } |
3411 virtual void DisconnectFromWirelessNetwork(const WirelessNetwork* network) {} | 3411 virtual void DisconnectFromWirelessNetwork(const WirelessNetwork* network) {} |
3412 virtual void ForgetWifiNetwork(const std::string& service_path) {} | 3412 virtual void ForgetWifiNetwork(const std::string& service_path) {} |
3413 virtual bool ethernet_available() const { return true; } | 3413 virtual bool ethernet_available() const { return true; } |
3414 virtual bool wifi_available() const { return false; } | 3414 virtual bool wifi_available() const { return false; } |
3415 virtual bool cellular_available() const { return false; } | 3415 virtual bool cellular_available() const { return true; } |
3416 virtual bool ethernet_enabled() const { return true; } | 3416 virtual bool ethernet_enabled() const { return true; } |
3417 virtual bool wifi_enabled() const { return false; } | 3417 virtual bool wifi_enabled() const { return false; } |
3418 virtual bool cellular_enabled() const { return false; } | 3418 virtual bool cellular_enabled() const { return false; } |
3419 virtual bool wifi_scanning() const { return false; } | 3419 virtual bool wifi_scanning() const { return false; } |
3420 virtual const Network* active_network() const { return NULL; } | 3420 virtual const Network* active_network() const { return NULL; } |
3421 virtual bool offline_mode() const { return false; } | 3421 virtual bool offline_mode() const { return false; } |
3422 virtual void EnableEthernetNetworkDevice(bool enable) {} | 3422 virtual void EnableEthernetNetworkDevice(bool enable) {} |
3423 virtual void EnableWifiNetworkDevice(bool enable) {} | 3423 virtual void EnableWifiNetworkDevice(bool enable) {} |
3424 virtual void EnableCellularNetworkDevice(bool enable) {} | 3424 virtual void EnableCellularNetworkDevice(bool enable) {} |
3425 virtual void EnableOfflineMode(bool enable) {} | 3425 virtual void EnableOfflineMode(bool enable) {} |
(...skipping 21 matching lines...) Expand all Loading... |
3447 return new NetworkLibraryStubImpl(); | 3447 return new NetworkLibraryStubImpl(); |
3448 else | 3448 else |
3449 return new NetworkLibraryImpl(); | 3449 return new NetworkLibraryImpl(); |
3450 } | 3450 } |
3451 | 3451 |
3452 } // namespace chromeos | 3452 } // namespace chromeos |
3453 | 3453 |
3454 // Allows InvokeLater without adding refcounting. This class is a Singleton and | 3454 // Allows InvokeLater without adding refcounting. This class is a Singleton and |
3455 // won't be deleted until it's last InvokeLater is run. | 3455 // won't be deleted until it's last InvokeLater is run. |
3456 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::NetworkLibraryImpl); | 3456 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::NetworkLibraryImpl); |
OLD | NEW |