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

Side by Side Diff: chrome/utility/wifi/wifi_service_mock.cc

Issue 32193015: WlanConnect to BSS with given frequency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync up to r231308 Created 7 years, 1 month 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 | « chrome/utility/wifi/wifi_service.h ('k') | chrome/utility/wifi/wifi_service_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/utility/wifi/wifi_service.h" 5 #include "chrome/utility/wifi/wifi_service.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "components/onc/onc_constants.h" 7 #include "components/onc/onc_constants.h"
8 8
9 namespace wifi { 9 namespace wifi {
10 10
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 virtual void GetVisibleNetworks( 121 virtual void GetVisibleNetworks(
122 const NetworkListCallback& callback, 122 const NetworkListCallback& callback,
123 const ErrorCallback& error_callback) OVERRIDE { 123 const ErrorCallback& error_callback) OVERRIDE {
124 callback.Run(networks_); 124 callback.Run(networks_);
125 } 125 }
126 126
127 virtual void RequestNetworkScan() OVERRIDE {} 127 virtual void RequestNetworkScan() OVERRIDE {}
128 128
129 virtual void StartConnect(const std::string& network_guid, 129 virtual void StartConnect(const std::string& network_guid,
130 Frequency frequency,
130 const StringResultCallback& callback, 131 const StringResultCallback& callback,
131 const ErrorCallback& error_callback) OVERRIDE { 132 const ErrorCallback& error_callback) OVERRIDE {
132 NetworkList::iterator network_properties = FindNetwork(network_guid); 133 NetworkList::iterator network_properties = FindNetwork(network_guid);
133 if (network_properties != networks_.end()) { 134 if (network_properties != networks_.end()) {
134 DisconnectAllNetworksOfType(network_properties->type); 135 DisconnectAllNetworksOfType(network_properties->type);
135 network_properties->connection_state = onc::connection_state::kConnected; 136 network_properties->connection_state = onc::connection_state::kConnected;
136 SortNetworks(); 137 SortNetworks();
137 callback.Run(network_guid); 138 callback.Run(network_guid);
138 NotifyNetworkListChanged(networks_); 139 NotifyNetworkListChanged(networks_);
139 NotifyNetworkChanged(network_guid); 140 NotifyNetworkChanged(network_guid);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 217
217 WiFiService* WiFiService::CreateServiceMock() { return new WiFiServiceMock(); } 218 WiFiService* WiFiService::CreateServiceMock() { return new WiFiServiceMock(); }
218 219
219 // TODO(mef): Figure out a better platform switching. For now all platform 220 // TODO(mef): Figure out a better platform switching. For now all platform
220 // except Windows use Mock implementation. 221 // except Windows use Mock implementation.
221 #if !defined(OS_WIN) 222 #if !defined(OS_WIN)
222 WiFiService* WiFiService::CreateService() { return new WiFiServiceMock(); } 223 WiFiService* WiFiService::CreateService() { return new WiFiServiceMock(); }
223 #endif 224 #endif
224 225
225 } // namespace wifi 226 } // namespace wifi
OLDNEW
« no previous file with comments | « chrome/utility/wifi/wifi_service.h ('k') | chrome/utility/wifi/wifi_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698