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

Side by Side Diff: net/dns/single_request_host_resolver.h

Issue 2116983002: Change HostResolver::Resolve() to take an std::unique_ptr<Request>* rather than a RequestHandle* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: http_stream_factory_impl_job_controller_unittest RequestHandle* to unique_ptr Created 4 years, 4 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) 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 #ifndef NET_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_ 5 #ifndef NET_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_
6 #define NET_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_ 6 #define NET_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "net/base/completion_callback.h" 9 #include "net/base/completion_callback.h"
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 private: 44 private:
45 // Callback for when the request to |resolver_| completes, so we dispatch 45 // Callback for when the request to |resolver_| completes, so we dispatch
46 // to the user's callback. 46 // to the user's callback.
47 void OnResolveCompletion(int result); 47 void OnResolveCompletion(int result);
48 48
49 // The actual host resolver that will handle the request. 49 // The actual host resolver that will handle the request.
50 HostResolver* const resolver_; 50 HostResolver* const resolver_;
51 51
52 // The current request (if any). 52 // The current request (if any).
53 HostResolver::RequestHandle cur_request_; 53 std::unique_ptr<HostResolver::Request> cur_request_;
54 CompletionCallback cur_request_callback_; 54 CompletionCallback cur_request_callback_;
55 55
56 // Completion callback for when request to |resolver_| completes. 56 // Completion callback for when request to |resolver_| completes.
57 CompletionCallback callback_; 57 CompletionCallback callback_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(SingleRequestHostResolver); 59 DISALLOW_COPY_AND_ASSIGN(SingleRequestHostResolver);
60 }; 60 };
61 61
62 } // namespace net 62 } // namespace net
63 63
64 #endif // NET_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_ 64 #endif // NET_DNS_SINGLE_REQUEST_HOST_RESOLVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698