Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Side by Side Diff: chrome/browser/chromeos/cros/fake/fake_network_library.h

Issue 2847072: Green Tree Tactical Force: Revert skrul's bad commits (probably a git-cl bug). (Closed)
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_FAKE_FAKE_NETWORK_LIBRARY_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_FAKE_FAKE_NETWORK_LIBRARY_H_
7
8 #include <string>
9
10 #include "base/string_util.h"
11 #include "chrome/browser/chromeos/cros/network_library.h"
12
13 namespace chromeos {
14
15 class FakeNetworkLibrary : public NetworkLibrary {
16 public:
17 FakeNetworkLibrary() : ip_address_("1.1.1.1") {}
18 virtual ~FakeNetworkLibrary() {}
19 virtual void AddObserver(Observer* observer) {}
20 virtual void RemoveObserver(Observer* observer) {}
21
22 virtual const EthernetNetwork& ethernet_network() const { return ethernet_; }
23 virtual bool ethernet_connecting() const { return false; }
24 virtual bool ethernet_connected() const { return true; }
25
26 virtual const std::string& wifi_name() const { return EmptyString(); }
27 virtual bool wifi_connecting() const { return false; }
28 virtual bool wifi_connected() const { return false; }
29 virtual int wifi_strength() const { return 0; }
30
31 virtual const std::string& cellular_name() const { return EmptyString(); }
32 virtual bool cellular_connecting() const { return false; }
33 virtual bool cellular_connected() const { return false; }
34 virtual int cellular_strength() const { return 0; }
35
36 virtual bool Connected() const {
37 return true;
38 }
39 virtual bool Connecting() const {
40 return false;
41 }
42 virtual const std::string& IPAddress() const {
43 return ip_address_;
44 }
45
46 virtual const WifiNetworkVector& wifi_networks() const {
47 return wifi_networks_;
48 }
49
50 virtual const WifiNetworkVector& remembered_wifi_networks() const {
51 return wifi_networks_;
52 }
53
54 virtual const CellularNetworkVector& cellular_networks() const {
55 return cellular_networks_;
56 }
57
58 virtual const CellularNetworkVector& remembered_cellular_networks() const {
59 return cellular_networks_;
60 }
61
62 virtual bool FindWifiNetworkByPath(const std::string& path,
63 WifiNetwork* network) const {
64 return false;
65 }
66 virtual bool FindCellularNetworkByPath(const std::string& path,
67 CellularNetwork* network) const {
68 return false;
69 }
70
71 virtual void RequestWifiScan() {}
72 virtual bool GetWifiAccessPoints(WifiAccessPointVector* result) {
73 return true;
74 }
75 virtual bool ConnectToPreferredNetworkIfAvailable() {
76 return false;
77 }
78 virtual bool PreferredNetworkConnected() {
79 return false;
80 }
81 virtual bool PreferredNetworkFailed() {
82 return false;
83 }
84 virtual void ConnectToWifiNetwork(WifiNetwork network,
85 const std::string& password,
86 const std::string& identity,
87 const std::string& certpath) {}
88 virtual void ConnectToWifiNetwork(const std::string& ssid,
89 const std::string& password,
90 const std::string& identity,
91 const std::string& certpath,
92 bool auto_connect) {}
93 virtual void ConnectToCellularNetwork(CellularNetwork network) {}
94 virtual void DisconnectFromWirelessNetwork(const WirelessNetwork& network) {}
95 virtual void SaveCellularNetwork(const CellularNetwork& network) {}
96 virtual void SaveWifiNetwork(const WifiNetwork& network) {}
97 virtual void ForgetWirelessNetwork(const WirelessNetwork& network) {}
98
99 virtual bool ethernet_available() const { return true; }
100 virtual bool wifi_available() const { return false; }
101 virtual bool cellular_available() const { return false; }
102
103 virtual bool ethernet_enabled() const { return true; }
104 virtual bool wifi_enabled() const { return false; }
105 virtual bool cellular_enabled() const { return false; }
106
107 virtual bool offline_mode() const { return false; }
108
109 virtual void EnableEthernetNetworkDevice(bool enable) {}
110 virtual void EnableWifiNetworkDevice(bool enable) {}
111 virtual void EnableCellularNetworkDevice(bool enable) {}
112 virtual void EnableOfflineMode(bool enable) {}
113 virtual NetworkIPConfigVector GetIPConfigs(const std::string& device_path) {
114 NetworkIPConfigVector ipconfig_vector;
115 return ipconfig_vector;
116 }
117 virtual std::string GetHtmlInfo(int refresh) {
118 return "";
119 }
120 virtual void UpdateSystemInfo() {}
121
122 private:
123 std::string ip_address_;
124 EthernetNetwork ethernet_;
125 WifiNetworkVector wifi_networks_;
126 CellularNetworkVector cellular_networks_;
127 };
128
129 } // namespace chromeos
130
131 #endif // CHROME_BROWSER_CHROMEOS_CROS_FAKE_FAKE_NETWORK_LIBRARY_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/fake/fake_mount_library.h ('k') | chrome/browser/chromeos/cros/fake/fake_power_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698