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

Side by Side Diff: net/tools/gdig/gdig.cc

Issue 1398973003: Don't use base::MessageLoop::{Quit,QuitClosure} in net/ (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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 base::Unretained(this))); 394 base::Unretained(this)));
395 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 395 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
396 FROM_HERE, timeout_closure_.callback(), config_timeout_); 396 FROM_HERE, timeout_closure_.callback(), config_timeout_);
397 } 397 }
398 } 398 }
399 399
400 void GDig::Finish(Result result) { 400 void GDig::Finish(Result result) {
401 DCHECK_NE(RESULT_PENDING, result); 401 DCHECK_NE(RESULT_PENDING, result);
402 result_ = result; 402 result_ = result;
403 if (base::MessageLoop::current()) 403 if (base::MessageLoop::current())
404 base::MessageLoop::current()->Quit(); 404 base::MessageLoop::current()->QuitWhenIdle();
405 } 405 }
406 406
407 void GDig::OnDnsConfig(const DnsConfig& dns_config_const) { 407 void GDig::OnDnsConfig(const DnsConfig& dns_config_const) {
408 timeout_closure_.Cancel(); 408 timeout_closure_.Cancel();
409 DCHECK(dns_config_const.IsValid()); 409 DCHECK(dns_config_const.IsValid());
410 DnsConfig dns_config = dns_config_const; 410 DnsConfig dns_config = dns_config_const;
411 411
412 if (timeout_.InMilliseconds() > 0) 412 if (timeout_.InMilliseconds() > 0)
413 dns_config.timeout = timeout_; 413 dns_config.timeout = timeout_;
414 if (print_config_) { 414 if (print_config_) {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 512 }
513 513
514 } // empty namespace 514 } // empty namespace
515 515
516 } // namespace net 516 } // namespace net
517 517
518 int main(int argc, const char* argv[]) { 518 int main(int argc, const char* argv[]) {
519 net::GDig dig; 519 net::GDig dig;
520 return dig.Main(argc, argv); 520 return dig.Main(argc, argv);
521 } 521 }
OLDNEW
« no previous file with comments | « net/test/embedded_test_server/embedded_test_server_unittest.cc ('k') | net/tools/get_server_time/get_server_time.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698