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

Side by Side Diff: net/http/http_stream_factory_impl_job_controller.h

Issue 2893713004: Return Request as unique_ptr from JobController::Start(). (Closed)
Patch Set: Fix conflict with https://crrev.com/2887773006. Created 3 years, 7 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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "net/base/host_port_pair.h" 10 #include "net/base/host_port_pair.h"
(...skipping 27 matching lines...) Expand all
38 38
39 // Used in tests only for verification purpose. 39 // Used in tests only for verification purpose.
40 const Job* main_job() const { return main_job_.get(); } 40 const Job* main_job() const { return main_job_.get(); }
41 const Job* alternative_job() const { return alternative_job_.get(); } 41 const Job* alternative_job() const { return alternative_job_.get(); }
42 42
43 GURL ApplyHostMappingRules(const GURL& url, HostPortPair* endpoint); 43 GURL ApplyHostMappingRules(const GURL& url, HostPortPair* endpoint);
44 44
45 // Methods below are called by HttpStreamFactoryImpl only. 45 // Methods below are called by HttpStreamFactoryImpl only.
46 // Creates request and hands out to HttpStreamFactoryImpl, this will also 46 // Creates request and hands out to HttpStreamFactoryImpl, this will also
47 // create Job(s) and start serving the created request. 47 // create Job(s) and start serving the created request.
48 Request* Start(HttpStreamRequest::Delegate* delegate, 48 std::unique_ptr<Request> Start(HttpStreamRequest::Delegate* delegate,
49 WebSocketHandshakeStreamBase::CreateHelper* 49 WebSocketHandshakeStreamBase::CreateHelper*
50 websocket_handshake_stream_create_helper, 50 websocket_handshake_stream_create_helper,
51 const NetLogWithSource& source_net_log, 51 const NetLogWithSource& source_net_log,
52 HttpStreamRequest::StreamType stream_type, 52 HttpStreamRequest::StreamType stream_type,
53 RequestPriority priority); 53 RequestPriority priority);
54 54
55 void Preconnect(int num_streams); 55 void Preconnect(int num_streams);
56 56
57 // From HttpStreamFactoryImpl::Request::Helper. 57 // From HttpStreamFactoryImpl::Request::Helper.
58 // Returns the LoadState for Request. 58 // Returns the LoadState for Request.
59 LoadState GetLoadState() const override; 59 LoadState GetLoadState() const override;
60 60
61 // Called when Request is destructed. Job(s) associated with but not bound to 61 // Called when Request is destructed. Job(s) associated with but not bound to
62 // |request_| will be deleted. |request_| and |bound_job_| will be nulled if 62 // |request_| will be deleted. |request_| and |bound_job_| will be nulled if
63 // ever set. 63 // ever set.
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 HttpStreamRequest::StreamType stream_type_; 349 HttpStreamRequest::StreamType stream_type_;
350 RequestPriority priority_; 350 RequestPriority priority_;
351 const NetLogWithSource net_log_; 351 const NetLogWithSource net_log_;
352 352
353 base::WeakPtrFactory<JobController> ptr_factory_; 353 base::WeakPtrFactory<JobController> ptr_factory_;
354 }; 354 };
355 355
356 } // namespace net 356 } // namespace net
357 357
358 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ 358 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl.cc ('k') | net/http/http_stream_factory_impl_job_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698