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

Side by Side Diff: net/tools/quic/synchronous_host_resolver.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
« no previous file with comments | « net/tools/get_server_time/get_server_time.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 "net/tools/quic/synchronous_host_resolver.h" 5 #include "net/tools/quic/synchronous_host_resolver.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 host_ = host; 82 host_ = host;
83 addresses_ = addresses; 83 addresses_ = addresses;
84 this->Start(); 84 this->Start();
85 this->Join(); 85 this->Join();
86 return rv_; 86 return rv_;
87 } 87 }
88 88
89 void ResolverThread::OnResolutionComplete(int rv) { 89 void ResolverThread::OnResolutionComplete(int rv) {
90 rv_ = rv; 90 rv_ = rv;
91 base::ThreadTaskRunnerHandle::Get()->PostTask( 91 base::ThreadTaskRunnerHandle::Get()->PostTask(
92 FROM_HERE, base::MessageLoop::QuitClosure()); 92 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
93 } 93 }
94 94
95 } // namespace 95 } // namespace
96 96
97 // static 97 // static
98 int SynchronousHostResolver::Resolve(const std::string& host, 98 int SynchronousHostResolver::Resolve(const std::string& host,
99 AddressList* addresses) { 99 AddressList* addresses) {
100 ResolverThread resolver; 100 ResolverThread resolver;
101 return resolver.Resolve(host, addresses); 101 return resolver.Resolve(host, addresses);
102 } 102 }
103 103
104 } // namespace tools 104 } // namespace tools
105 } // namespace net 105 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/get_server_time/get_server_time.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698