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

Side by Side Diff: components/wifi/fake_wifi_service.h

Issue 264773017: components: Do not include test code in wifi_component target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: we only build FakeWiFiService on either win or mac - chromeos is not supported Created 6 years, 7 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
« no previous file with comments | « components/wifi.gypi ('k') | components/wifi/fake_wifi_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 "base/compiler_specific.h"
9 #include "base/macros.h"
10 #include "components/wifi/wifi_service.h"
11
12 namespace wifi {
13
14 // Fake implementation of WiFiService used to satisfy expectations of
15 // networkingPrivateApi browser test.
16 class FakeWiFiService : public WiFiService {
17 public:
18 FakeWiFiService();
19 virtual ~FakeWiFiService();
20
21 virtual void Initialize(
22 scoped_refptr<base::SequencedTaskRunner> task_runner) OVERRIDE;
23 virtual void UnInitialize() OVERRIDE;
24 virtual void GetProperties(const std::string& network_guid,
25 base::DictionaryValue* properties,
26 std::string* error) OVERRIDE;
27 virtual void GetManagedProperties(const std::string& network_guid,
28 base::DictionaryValue* managed_properties,
29 std::string* error) OVERRIDE;
30 virtual void GetState(const std::string& network_guid,
31 base::DictionaryValue* properties,
32 std::string* error) OVERRIDE;
33 virtual void SetProperties(const std::string& network_guid,
34 scoped_ptr<base::DictionaryValue> properties,
35 std::string* error) OVERRIDE;
36 virtual void CreateNetwork(bool shared,
37 scoped_ptr<base::DictionaryValue> properties,
38 std::string* network_guid,
39 std::string* error) OVERRIDE;
40 virtual void GetVisibleNetworks(const std::string& network_type,
41 base::ListValue* network_list) OVERRIDE;
42 virtual void RequestNetworkScan() OVERRIDE;
43 virtual void StartConnect(const std::string& network_guid,
44 std::string* error) OVERRIDE;
45 virtual void StartDisconnect(const std::string& network_guid,
46 std::string* error) OVERRIDE;
47 virtual void GetKeyFromSystem(const std::string& network_guid,
48 std::string* key_data,
49 std::string* error) OVERRIDE;
50 virtual void SetEventObservers(
51 scoped_refptr<base::MessageLoopProxy> message_loop_proxy,
52 const NetworkGuidListCallback& networks_changed_observer,
53 const NetworkGuidListCallback& network_list_changed_observer) OVERRIDE;
54 virtual void RequestConnectedNetworkUpdate() OVERRIDE;
55
56 private:
57 NetworkList::iterator FindNetwork(const std::string& network_guid);
58
59 void DisconnectAllNetworksOfType(const std::string& type);
60
61 void SortNetworks();
62
63 void NotifyNetworkListChanged(const NetworkList& networks);
64
65 void NotifyNetworkChanged(const std::string& network_guid);
66
67 NetworkList networks_;
68 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
69 NetworkGuidListCallback networks_changed_observer_;
70 NetworkGuidListCallback network_list_changed_observer_;
71
72 DISALLOW_COPY_AND_ASSIGN(FakeWiFiService);
73 };
74
75 } // namespace wifi
76
77 #endif // COMPONENTS_WIFI_FAKE_WIFI_SERVICE_H_
OLDNEW
« no previous file with comments | « components/wifi.gypi ('k') | components/wifi/fake_wifi_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698