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

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

Issue 64683014: Mac OS X-specific implementation of Networking Private API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove ScopedNSAutoreleasePool. Created 6 years, 11 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
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 "components/wifi/wifi_service.h" 5 #include "components/wifi/wifi_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "components/onc/onc_constants.h" 10 #include "components/onc/onc_constants.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 networks_.push_back(network_properties); 50 networks_.push_back(network_properties);
51 } 51 }
52 { 52 {
53 WiFiService::NetworkProperties network_properties; 53 WiFiService::NetworkProperties network_properties;
54 network_properties.connection_state = 54 network_properties.connection_state =
55 onc::connection_state::kNotConnected; 55 onc::connection_state::kNotConnected;
56 network_properties.guid = "stub_wifi2"; 56 network_properties.guid = "stub_wifi2";
57 network_properties.name = "wifi2_PSK"; 57 network_properties.name = "wifi2_PSK";
58 network_properties.type = onc::network_type::kWiFi; 58 network_properties.type = onc::network_type::kWiFi;
59 network_properties.frequency = 5000; 59 network_properties.frequency = 5000;
60 network_properties.frequency_list.push_back(2400); 60 network_properties.frequency_set.insert(2400);
61 network_properties.frequency_list.push_back(5000); 61 network_properties.frequency_set.insert(5000);
62 network_properties.ssid = "wifi2_PSK"; 62 network_properties.ssid = "wifi2_PSK";
63 network_properties.security = onc::wifi::kWPA_PSK; 63 network_properties.security = onc::wifi::kWPA_PSK;
64 network_properties.signal_strength = 80; 64 network_properties.signal_strength = 80;
65 networks_.push_back(network_properties); 65 networks_.push_back(network_properties);
66 } 66 }
67 { 67 {
68 WiFiService::NetworkProperties network_properties; 68 WiFiService::NetworkProperties network_properties;
69 network_properties.connection_state = 69 network_properties.connection_state =
70 onc::connection_state::kNotConnected; 70 onc::connection_state::kNotConnected;
71 network_properties.guid = "stub_cellular1"; 71 network_properties.guid = "stub_cellular1";
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 NetworkList networks_; 310 NetworkList networks_;
311 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; 311 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
312 NetworkGuidListCallback networks_changed_observer_; 312 NetworkGuidListCallback networks_changed_observer_;
313 NetworkGuidListCallback network_list_changed_observer_; 313 NetworkGuidListCallback network_list_changed_observer_;
314 }; 314 };
315 315
316 WiFiService* WiFiService::CreateForTest() { return new FakeWiFiService(); } 316 WiFiService* WiFiService::CreateForTest() { return new FakeWiFiService(); }
317 317
318 } // namespace wifi 318 } // namespace wifi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698