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

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

Issue 68503019: Windows-specific implementation of Networking Private API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Win64 compilation error. 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 | « components/wifi.gypi ('k') | components/wifi/wifi_service.h » ('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 "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/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "components/onc/onc_constants.h" 9 #include "components/onc/onc_constants.h"
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 " {" 74 " {"
75 " \"ActivateOverNonCellularNetwork\": false," 75 " \"ActivateOverNonCellularNetwork\": false,"
76 " \"ActivationState\": \"not-activated\"," 76 " \"ActivationState\": \"not-activated\","
77 " \"NetworkTechnology\": \"GSM\"," 77 " \"NetworkTechnology\": \"GSM\","
78 " \"RoamingState\": \"home\"" 78 " \"RoamingState\": \"home\""
79 " }"; 79 " }";
80 networks_.push_back(network_properties); 80 networks_.push_back(network_properties);
81 } 81 }
82 } 82 }
83 83
84 virtual void Initialize(
85 scoped_refptr<base::SequencedTaskRunner> task_runner) OVERRIDE {}
86
87 virtual void UnInitialize() OVERRIDE {}
88
84 virtual void GetProperties(const std::string& network_guid, 89 virtual void GetProperties(const std::string& network_guid,
85 DictionaryValue* properties, 90 DictionaryValue* properties,
86 std::string* error) OVERRIDE { 91 std::string* error) OVERRIDE {
87 NetworkList::iterator network_properties = FindNetwork(network_guid); 92 NetworkList::iterator network_properties = FindNetwork(network_guid);
88 if (network_properties != networks_.end()) { 93 if (network_properties != networks_.end()) {
89 properties->Swap(network_properties->ToValue(false).get()); 94 properties->Swap(network_properties->ToValue(false).get());
90 } else { 95 } else {
91 *error = "Error.DBusFailed"; 96 *error = "Error.DBusFailed";
92 } 97 }
93 } 98 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 base::Bind(networks_changed_observer_, changed_networks)); 201 base::Bind(networks_changed_observer_, changed_networks));
197 } 202 }
198 203
199 NetworkList networks_; 204 NetworkList networks_;
200 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; 205 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
201 NetworkGuidListCallback networks_changed_observer_; 206 NetworkGuidListCallback networks_changed_observer_;
202 NetworkGuidListCallback network_list_changed_observer_; 207 NetworkGuidListCallback network_list_changed_observer_;
203 }; 208 };
204 209
205 WiFiService* WiFiService::CreateForTest() { return new FakeWiFiService(); } 210 WiFiService* WiFiService::CreateForTest() { return new FakeWiFiService(); }
206 WiFiService* WiFiService::Create() { return new FakeWiFiService(); }
207 211
208 } // namespace wifi 212 } // namespace wifi
OLDNEW
« no previous file with comments | « components/wifi.gypi ('k') | components/wifi/wifi_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698