Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: components/wifi/wifi_test.cc

Issue 1402553002: Don't use base::MessageLoop::{Quit,QuitClosure} in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/wallpaper/wallpaper_resizer_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « components/wallpaper/wallpaper_resizer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698