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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 Result Main(int argc, const char* argv[]); | 43 Result Main(int argc, const char* argv[]); |
44 | 44 |
45 private: | 45 private: |
46 bool ParseCommandLine(int argc, const char* argv[]); | 46 bool ParseCommandLine(int argc, const char* argv[]); |
47 | 47 |
48 void Start() {} | 48 void Start() {} |
49 void Finish(Result result) { | 49 void Finish(Result result) { |
50 DCHECK_NE(RESULT_PENDING, result); | 50 DCHECK_NE(RESULT_PENDING, result); |
51 result_ = result; | 51 result_ = result; |
52 if (base::MessageLoop::current()) | 52 if (base::MessageLoop::current()) |
53 base::MessageLoop::current()->Quit(); | 53 base::MessageLoop::current()->QuitWhenIdle(); |
54 } | 54 } |
55 | 55 |
56 void OnNetworksChanged( | 56 void OnNetworksChanged( |
57 const WiFiService::NetworkGuidList& network_guid_list) { | 57 const WiFiService::NetworkGuidList& network_guid_list) { |
58 VLOG(0) << "Networks Changed: " << network_guid_list[0]; | 58 VLOG(0) << "Networks Changed: " << network_guid_list[0]; |
59 base::DictionaryValue properties; | 59 base::DictionaryValue properties; |
60 std::string error; | 60 std::string error; |
61 wifi_service_->GetProperties(network_guid_list[0], &properties, &error); | 61 wifi_service_->GetProperties(network_guid_list[0], &properties, &error); |
62 VLOG(0) << error << ":\n" << properties; | 62 VLOG(0) << error << ":\n" << properties; |
63 } | 63 } |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 251 |
252 int main(int argc, const char* argv[]) { | 252 int main(int argc, const char* argv[]) { |
253 base::CommandLine::Init(argc, argv); | 253 base::CommandLine::Init(argc, argv); |
254 logging::LoggingSettings settings; | 254 logging::LoggingSettings settings; |
255 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; | 255 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
256 logging::InitLogging(settings); | 256 logging::InitLogging(settings); |
257 | 257 |
258 wifi::WiFiTest wifi_test; | 258 wifi::WiFiTest wifi_test; |
259 return wifi_test.Main(argc, argv); | 259 return wifi_test.Main(argc, argv); |
260 } | 260 } |
OLD | NEW |