OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |