| 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 <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/cancelable_callback.h" | 10 #include "base/cancelable_callback.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 MessageBoxA(NULL, __FUNCTION__, "Debug Me!", MB_OK); | 128 MessageBoxA(NULL, __FUNCTION__, "Debug Me!", MB_OK); |
| 129 #endif | 129 #endif |
| 130 | 130 |
| 131 base::MessageLoopForIO loop; | 131 base::MessageLoopForIO loop; |
| 132 | 132 |
| 133 wifi_service_.reset(WiFiService::Create()); | 133 wifi_service_.reset(WiFiService::Create()); |
| 134 wifi_service_->Initialize(loop.message_loop_proxy()); | 134 wifi_service_->Initialize(loop.message_loop_proxy()); |
| 135 | 135 |
| 136 if (parsed_command_line.HasSwitch("list")) { | 136 if (parsed_command_line.HasSwitch("list")) { |
| 137 base::ListValue network_list; | 137 base::ListValue network_list; |
| 138 wifi_service_->GetVisibleNetworks(std::string(), &network_list); | 138 wifi_service_->GetVisibleNetworks(std::string(), &network_list, true); |
| 139 VLOG(0) << network_list; | 139 VLOG(0) << network_list; |
| 140 return true; | 140 return true; |
| 141 } | 141 } |
| 142 | 142 |
| 143 if (parsed_command_line.HasSwitch("get_properties")) { | 143 if (parsed_command_line.HasSwitch("get_properties")) { |
| 144 if (network_guid.length() > 0) { | 144 if (network_guid.length() > 0) { |
| 145 base::DictionaryValue properties; | 145 base::DictionaryValue properties; |
| 146 std::string error; | 146 std::string error; |
| 147 wifi_service_->GetProperties(network_guid, &properties, &error); | 147 wifi_service_->GetProperties(network_guid, &properties, &error); |
| 148 VLOG(0) << error << ":\n" << properties; | 148 VLOG(0) << error << ":\n" << properties; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 227 |
| 228 int main(int argc, const char* argv[]) { | 228 int main(int argc, const char* argv[]) { |
| 229 CommandLine::Init(argc, argv); | 229 CommandLine::Init(argc, argv); |
| 230 logging::LoggingSettings settings; | 230 logging::LoggingSettings settings; |
| 231 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; | 231 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
| 232 logging::InitLogging(settings); | 232 logging::InitLogging(settings); |
| 233 | 233 |
| 234 wifi::WiFiTest wifi_test; | 234 wifi::WiFiTest wifi_test; |
| 235 return wifi_test.Main(argc, argv); | 235 return wifi_test.Main(argc, argv); |
| 236 } | 236 } |
| OLD | NEW |