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

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

Issue 88653002: Move GetVisibleNetworks network type filtering to WiFiService interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Toni's comments. Created 7 years 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/wifi_service_win.cc ('k') | no next file » | 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 <stdio.h> 5 #include <stdio.h>
6 #include <iostream> 6 #include <iostream>
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 #if defined(OS_WIN) 105 #if defined(OS_WIN)
106 scoped_ptr<WiFiService> wifi_service(WiFiService::Create()); 106 scoped_ptr<WiFiService> wifi_service(WiFiService::Create());
107 #else 107 #else
108 scoped_ptr<WiFiService> wifi_service(WiFiService::CreateForTest()); 108 scoped_ptr<WiFiService> wifi_service(WiFiService::CreateForTest());
109 #endif 109 #endif
110 110
111 wifi_service->Initialize(NULL); 111 wifi_service->Initialize(NULL);
112 112
113 if (parsed_command_line.HasSwitch("list")) { 113 if (parsed_command_line.HasSwitch("list")) {
114 ListValue network_list; 114 ListValue network_list;
115 wifi_service->GetVisibleNetworks(&network_list); 115 wifi_service->GetVisibleNetworks(std::string(), &network_list);
116 std::cout << network_list; 116 std::cout << network_list;
117 return true; 117 return true;
118 } 118 }
119 119
120 if (parsed_command_line.HasSwitch("get_properties")) { 120 if (parsed_command_line.HasSwitch("get_properties")) {
121 if (network_guid.length() > 0) { 121 if (network_guid.length() > 0) {
122 DictionaryValue properties; 122 DictionaryValue properties;
123 std::string error; 123 std::string error;
124 wifi_service->GetProperties(network_guid, &properties, &error); 124 wifi_service->GetProperties(network_guid, &properties, &error);
125 std::cout << error << ":\n" << properties; 125 std::cout << error << ":\n" << properties;
(...skipping 21 matching lines...) Expand all
147 147
148 return false; 148 return false;
149 } 149 }
150 150
151 } // namespace wifi 151 } // namespace wifi
152 152
153 int main(int argc, const char* argv[]) { 153 int main(int argc, const char* argv[]) {
154 wifi::WiFiTest wifi_test; 154 wifi::WiFiTest wifi_test;
155 return wifi_test.Main(argc, argv); 155 return wifi_test.Main(argc, argv);
156 } 156 }
OLDNEW
« no previous file with comments | « components/wifi/wifi_service_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698