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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 return RESULT_WRONG_USAGE; | 98 return RESULT_WRONG_USAGE; |
99 } | 99 } |
100 | 100 |
101 base::MessageLoopForIO loop; | 101 base::MessageLoopForIO loop; |
102 result_ = RESULT_PENDING; | 102 result_ = RESULT_PENDING; |
103 | 103 |
104 return result_; | 104 return result_; |
105 } | 105 } |
106 | 106 |
107 bool WiFiTest::ParseCommandLine(int argc, const char* argv[]) { | 107 bool WiFiTest::ParseCommandLine(int argc, const char* argv[]) { |
108 CommandLine::Init(argc, argv); | 108 base::CommandLine::Init(argc, argv); |
109 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 109 const base::CommandLine& parsed_command_line = |
| 110 *base::CommandLine::ForCurrentProcess(); |
110 std::string network_guid = | 111 std::string network_guid = |
111 parsed_command_line.GetSwitchValueASCII("network_guid"); | 112 parsed_command_line.GetSwitchValueASCII("network_guid"); |
112 std::string frequency = | 113 std::string frequency = |
113 parsed_command_line.GetSwitchValueASCII("frequency"); | 114 parsed_command_line.GetSwitchValueASCII("frequency"); |
114 std::string password = | 115 std::string password = |
115 parsed_command_line.GetSwitchValueASCII("password"); | 116 parsed_command_line.GetSwitchValueASCII("password"); |
116 std::string security = | 117 std::string security = |
117 parsed_command_line.GetSwitchValueASCII("security"); | 118 parsed_command_line.GetSwitchValueASCII("security"); |
118 | 119 |
119 if (parsed_command_line.GetArgs().size() == 1) { | 120 if (parsed_command_line.GetArgs().size() == 1) { |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 base::MessageLoop::current()->Run(); | 231 base::MessageLoop::current()->Run(); |
231 return true; | 232 return true; |
232 } | 233 } |
233 | 234 |
234 return false; | 235 return false; |
235 } | 236 } |
236 | 237 |
237 } // namespace wifi | 238 } // namespace wifi |
238 | 239 |
239 int main(int argc, const char* argv[]) { | 240 int main(int argc, const char* argv[]) { |
240 CommandLine::Init(argc, argv); | 241 base::CommandLine::Init(argc, argv); |
241 logging::LoggingSettings settings; | 242 logging::LoggingSettings settings; |
242 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; | 243 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
243 logging::InitLogging(settings); | 244 logging::InitLogging(settings); |
244 | 245 |
245 wifi::WiFiTest wifi_test; | 246 wifi::WiFiTest wifi_test; |
246 return wifi_test.Main(argc, argv); | 247 return wifi_test.Main(argc, argv); |
247 } | 248 } |
OLD | NEW |