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" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
17 #include "base/strings/string_split.h" | 17 #include "base/strings/string_split.h" |
18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
19 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
| 20 #include "base/strings/utf_string_conversions.h" |
20 #include "base/time/time.h" | 21 #include "base/time/time.h" |
21 #include "components/wifi/wifi_service.h" | 22 #include "components/wifi/wifi_service.h" |
22 | 23 |
23 #if defined(OS_MACOSX) | 24 #if defined(OS_MACOSX) |
24 #include "base/mac/scoped_nsautorelease_pool.h" | 25 #include "base/mac/scoped_nsautorelease_pool.h" |
25 #endif | 26 #endif |
26 | 27 |
27 namespace wifi { | 28 namespace wifi { |
28 | 29 |
29 class WiFiTest { | 30 class WiFiTest { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 parsed_command_line.GetSwitchValueASCII("network_guid"); | 93 parsed_command_line.GetSwitchValueASCII("network_guid"); |
93 std::string frequency = | 94 std::string frequency = |
94 parsed_command_line.GetSwitchValueASCII("frequency"); | 95 parsed_command_line.GetSwitchValueASCII("frequency"); |
95 std::string password = | 96 std::string password = |
96 parsed_command_line.GetSwitchValueASCII("password"); | 97 parsed_command_line.GetSwitchValueASCII("password"); |
97 std::string security = | 98 std::string security = |
98 parsed_command_line.GetSwitchValueASCII("security"); | 99 parsed_command_line.GetSwitchValueASCII("security"); |
99 | 100 |
100 if (parsed_command_line.GetArgs().size() == 1) { | 101 if (parsed_command_line.GetArgs().size() == 1) { |
101 #if defined(OS_WIN) | 102 #if defined(OS_WIN) |
102 network_guid = WideToASCII(parsed_command_line.GetArgs()[0]); | 103 network_guid = base::UTF16ToASCII(parsed_command_line.GetArgs()[0]); |
103 #else | 104 #else |
104 network_guid = parsed_command_line.GetArgs()[0]; | 105 network_guid = parsed_command_line.GetArgs()[0]; |
105 #endif | 106 #endif |
106 } | 107 } |
107 | 108 |
108 #if defined(OS_WIN) | 109 #if defined(OS_WIN) |
109 if (parsed_command_line.HasSwitch("debug")) | 110 if (parsed_command_line.HasSwitch("debug")) |
110 MessageBoxA(NULL, __FUNCTION__, "Debug Me!", MB_OK); | 111 MessageBoxA(NULL, __FUNCTION__, "Debug Me!", MB_OK); |
111 #endif | 112 #endif |
112 | 113 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 211 |
211 int main(int argc, const char* argv[]) { | 212 int main(int argc, const char* argv[]) { |
212 CommandLine::Init(argc, argv); | 213 CommandLine::Init(argc, argv); |
213 logging::LoggingSettings settings; | 214 logging::LoggingSettings settings; |
214 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; | 215 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
215 logging::InitLogging(settings); | 216 logging::InitLogging(settings); |
216 | 217 |
217 wifi::WiFiTest wifi_test; | 218 wifi::WiFiTest wifi_test; |
218 return wifi_test.Main(argc, argv); | 219 return wifi_test.Main(argc, argv); |
219 } | 220 } |
OLD | NEW |