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

Side by Side Diff: chrome/browser/chromeos/cros/network_library_impl_stub.h

Issue 23618026: NOT FOR SUBMIT: Remove NetworkLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_STUB_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_STUB_H_
7
8 #include "chrome/browser/chromeos/cros/network_library_impl_base.h"
9
10 namespace chromeos {
11
12 class NetworkLibraryImplStub : public NetworkLibraryImplBase {
13 public:
14 NetworkLibraryImplStub();
15 virtual ~NetworkLibraryImplStub();
16
17 virtual void Init() OVERRIDE;
18 virtual bool IsCros() const OVERRIDE;
19
20 // NetworkLibraryImplBase implementation.
21
22 virtual void MonitorNetworkStart(const std::string& service_path) OVERRIDE;
23 virtual void MonitorNetworkStop(const std::string& service_path) OVERRIDE;
24 virtual void MonitorNetworkDeviceStart(
25 const std::string& device_path) OVERRIDE;
26 virtual void MonitorNetworkDeviceStop(
27 const std::string& device_path) OVERRIDE;
28
29 virtual void CallConfigureService(const std::string& identifier,
30 const DictionaryValue* info) OVERRIDE;
31 virtual void CallConnectToNetwork(Network* network) OVERRIDE;
32 virtual void CallRequestWifiNetworkAndConnect(
33 const std::string& ssid, ConnectionSecurity security) OVERRIDE;
34 virtual void CallRequestVirtualNetworkAndConnect(
35 const std::string& service_name,
36 const std::string& server_hostname,
37 ProviderType provider_type) OVERRIDE;
38
39 virtual void CallDeleteRememberedNetwork(
40 const std::string& profile_path,
41 const std::string& service_path) OVERRIDE;
42
43 virtual void CallEnableNetworkDeviceType(
44 ConnectionType device, bool enable) OVERRIDE;
45
46 virtual void CallRemoveNetwork(const Network* network) OVERRIDE;
47
48 // NetworkLibrary implementation.
49
50 virtual void ChangePin(const std::string& old_pin,
51 const std::string& new_pin) OVERRIDE;
52 virtual void ChangeRequirePin(bool require_pin,
53 const std::string& pin) OVERRIDE;
54 virtual void EnterPin(const std::string& pin) OVERRIDE;
55 virtual void UnblockPin(const std::string& puk,
56 const std::string& new_pin) OVERRIDE;
57
58 virtual void RequestCellularScan() OVERRIDE;
59 virtual void RequestCellularRegister(
60 const std::string& network_id) OVERRIDE;
61 virtual void SetCellularDataRoamingAllowed(bool new_value) OVERRIDE;
62 virtual void SetCarrier(const std::string& carrier,
63 const NetworkOperationCallback& completed) OVERRIDE;
64 virtual bool IsCellularAlwaysInRoaming() OVERRIDE;
65 virtual void RequestNetworkScan() OVERRIDE;
66
67 virtual void DisconnectFromNetwork(const Network* network) OVERRIDE;
68
69 virtual void GetIPConfigs(
70 const std::string& device_path,
71 HardwareAddressFormat format,
72 const NetworkGetIPConfigsCallback& callback) OVERRIDE;
73 virtual void SetIPParameters(const std::string& service_path,
74 const std::string& address,
75 const std::string& netmask,
76 const std::string& gateway,
77 const std::string& name_servers,
78 int dhcp_usage_mask) OVERRIDE;
79 virtual void RequestNetworkServiceProperties(
80 const std::string& service_path,
81 const NetworkServicePropertiesCallback& callback) OVERRIDE;
82
83 // For testing only:
84 // Returns the configurations applied in LoadOncNetworks. The key is the
85 // network's service path which is mapped to the Shill dictionary.
86 const std::map<std::string, base::DictionaryValue*>& GetConfigurations();
87
88 private:
89 void CompleteWifiInit();
90 void CompleteCellularInit();
91 void CompleteCellularActivate();
92 void AddStubNetwork(Network* network, NetworkProfileType profile_type);
93 void AddStubRememberedNetwork(Network* network);
94 void ConnectToNetwork(Network* network);
95 void ScanCompleted();
96 void SendNetworkServiceProperties(
97 const std::string& service_path,
98 const NetworkServicePropertiesCallback& callback);
99
100 std::string ip_address_;
101 std::string hardware_address_;
102 NetworkIPConfigVector ip_configs_;
103 std::string pin_;
104 bool pin_required_;
105 bool pin_entered_;
106 int network_priority_order_;
107 WifiNetworkVector disabled_wifi_networks_;
108 CellularNetworkVector disabled_cellular_networks_;
109 WimaxNetworkVector disabled_wimax_networks_;
110 std::map<std::string, base::DictionaryValue*> service_configurations_;
111 base::WeakPtrFactory<NetworkLibraryImplStub> weak_pointer_factory_;
112
113 DISALLOW_COPY_AND_ASSIGN(NetworkLibraryImplStub);
114 };
115
116 } // namespace chromeos
117
118 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_STUB_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_library_impl_cros.cc ('k') | chrome/browser/chromeos/cros/network_library_impl_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698