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

Side by Side Diff: net/proxy/mock_proxy_resolver.cc

Issue 2082773002: Remove calls to MessageLoop::current() in net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forward declaration Created 4 years, 5 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/proxy/mock_proxy_resolver.h ('k') | net/quic/quic_connection_logger.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/proxy/mock_proxy_resolver.h" 5 #include "net/proxy/mock_proxy_resolver.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/message_loop/message_loop.h"
12 11
13 namespace net { 12 namespace net {
14 13
15 MockAsyncProxyResolver::Request::Request(MockAsyncProxyResolver* resolver, 14 MockAsyncProxyResolver::Request::Request(MockAsyncProxyResolver* resolver,
16 const GURL& url, 15 const GURL& url,
17 ProxyInfo* results, 16 ProxyInfo* results,
18 const CompletionCallback& callback) 17 const CompletionCallback& callback)
19 : resolver_(resolver), 18 : resolver_(resolver), url_(url), results_(results), callback_(callback) {}
20 url_(url),
21 results_(results),
22 callback_(callback),
23 origin_loop_(base::MessageLoop::current()) {
24 }
25 19
26 void MockAsyncProxyResolver::Request::CompleteNow(int rv) { 20 void MockAsyncProxyResolver::Request::CompleteNow(int rv) {
27 CompletionCallback callback = callback_; 21 CompletionCallback callback = callback_;
28 22
29 // May delete |this|. 23 // May delete |this|.
30 resolver_->RemovePendingRequest(this); 24 resolver_->RemovePendingRequest(this);
31 25
32 callback.Run(rv); 26 callback.Run(rv);
33 } 27 }
34 28
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 166
173 void ForwardingProxyResolver::CancelRequest(RequestHandle request) { 167 void ForwardingProxyResolver::CancelRequest(RequestHandle request) {
174 impl_->CancelRequest(request); 168 impl_->CancelRequest(request);
175 } 169 }
176 170
177 LoadState ForwardingProxyResolver::GetLoadState(RequestHandle request) const { 171 LoadState ForwardingProxyResolver::GetLoadState(RequestHandle request) const {
178 return impl_->GetLoadState(request); 172 return impl_->GetLoadState(request);
179 } 173 }
180 174
181 } // namespace net 175 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/mock_proxy_resolver.h ('k') | net/quic/quic_connection_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698