OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 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 COMPONENTS_WIFI_FAKE_WIFI_SERVICE_H_ | |
6 #define COMPONENTS_WIFI_FAKE_WIFI_SERVICE_H_ | |
7 | |
8 #include "components/wifi/wifi_service.h" | |
9 | |
Lei Zhang
2014/05/04 00:41:20
#include compiler_specific.h for OVERRIDE?
tfarina
2014/05/04 03:23:12
Done. Though macros.h already includes compiler_sp
| |
10 namespace wifi { | |
11 | |
12 // Fake implementation of WiFiService used to satisfy expectations of | |
13 // networkingPrivateApi browser test. | |
14 class FakeWiFiService : public WiFiService { | |
15 public: | |
16 FakeWiFiService(); | |
17 virtual ~FakeWiFiService(); | |
18 | |
19 virtual void Initialize( | |
20 scoped_refptr<base::SequencedTaskRunner> task_runner) OVERRIDE; | |
21 virtual void UnInitialize() OVERRIDE; | |
22 virtual void GetProperties(const std::string& network_guid, | |
23 base::DictionaryValue* properties, | |
24 std::string* error) OVERRIDE; | |
25 virtual void GetManagedProperties(const std::string& network_guid, | |
26 base::DictionaryValue* managed_properties, | |
27 std::string* error) OVERRIDE; | |
28 virtual void GetState(const std::string& network_guid, | |
29 base::DictionaryValue* properties, | |
30 std::string* error) OVERRIDE; | |
31 virtual void SetProperties(const std::string& network_guid, | |
32 scoped_ptr<base::DictionaryValue> properties, | |
33 std::string* error) OVERRIDE; | |
34 virtual void CreateNetwork(bool shared, | |
35 scoped_ptr<base::DictionaryValue> properties, | |
36 std::string* network_guid, | |
37 std::string* error) OVERRIDE; | |
38 virtual void GetVisibleNetworks(const std::string& network_type, | |
39 base::ListValue* network_list) OVERRIDE; | |
40 virtual void RequestNetworkScan() OVERRIDE; | |
41 virtual void StartConnect(const std::string& network_guid, | |
42 std::string* error) OVERRIDE; | |
43 virtual void StartDisconnect(const std::string& network_guid, | |
44 std::string* error) OVERRIDE; | |
45 virtual void GetKeyFromSystem(const std::string& network_guid, | |
46 std::string* key_data, | |
47 std::string* error) OVERRIDE; | |
48 virtual void SetEventObservers( | |
49 scoped_refptr<base::MessageLoopProxy> message_loop_proxy, | |
50 const NetworkGuidListCallback& networks_changed_observer, | |
51 const NetworkGuidListCallback& network_list_changed_observer) OVERRIDE; | |
52 virtual void RequestConnectedNetworkUpdate() OVERRIDE; | |
53 | |
54 private: | |
55 NetworkList::iterator FindNetwork(const std::string& network_guid); | |
56 | |
57 void DisconnectAllNetworksOfType(const std::string& type); | |
58 | |
59 void SortNetworks(); | |
60 | |
61 void NotifyNetworkListChanged(const NetworkList& networks); | |
62 | |
63 void NotifyNetworkChanged(const std::string& network_guid); | |
64 | |
65 NetworkList networks_; | |
66 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; | |
67 NetworkGuidListCallback networks_changed_observer_; | |
68 NetworkGuidListCallback network_list_changed_observer_; | |
69 }; | |
Lei Zhang
2014/05/04 00:41:20
DISALLOW_COPY_AND_ASSIGN (from base/macros.h)
tfarina
2014/05/04 03:23:12
Done.
| |
70 | |
71 } // namespace wifi | |
72 | |
73 #endif // COMPONENTS_WIFI_FAKE_WIFI_SERVICE_H_ | |
OLD | NEW |