| Index: net/http/http_stream_factory_impl_job.h
|
| diff --git a/net/http/http_stream_factory_impl_job.h b/net/http/http_stream_factory_impl_job.h
|
| index c7c69f0602705b9fab565011633829c4f8d6f3f3..92908e7aecbd67fc49ffebd1f2960b53f41a80c7 100644
|
| --- a/net/http/http_stream_factory_impl_job.h
|
| +++ b/net/http/http_stream_factory_impl_job.h
|
| @@ -41,7 +41,10 @@ class QuicHttpStream;
|
| class HttpStreamFactoryImpl::Job {
|
| public:
|
| // Constructor for non-alternative Job.
|
| - Job(HttpStreamFactoryImpl* stream_factory,
|
| + // Job is owned by JobController, hence |job_controller| is valid for the
|
| + // lifetime of the Job.
|
| + Job(JobController* job_controller,
|
| + JobType job_type,
|
| HttpNetworkSession* session,
|
| const HttpRequestInfo& request_info,
|
| RequestPriority priority,
|
| @@ -50,8 +53,10 @@ class HttpStreamFactoryImpl::Job {
|
| HostPortPair destination,
|
| GURL origin_url,
|
| NetLog* net_log);
|
| +
|
| // Constructor for alternative Job.
|
| - Job(HttpStreamFactoryImpl* stream_factory,
|
| + Job(JobController* job_controller,
|
| + JobType job_type,
|
| HttpNetworkSession* session,
|
| const HttpRequestInfo& request_info,
|
| RequestPriority priority,
|
| @@ -63,9 +68,9 @@ class HttpStreamFactoryImpl::Job {
|
| NetLog* net_log);
|
| ~Job();
|
|
|
| - // Start initiates the process of creating a new HttpStream. |request| will be
|
| - // notified upon completion if the Job has not been Orphan()'d.
|
| - void Start(Request* request);
|
| + // Start initiates the process of creating a new HttpStream.
|
| + // |job_controller_| will be notified upon completion.
|
| + void Start(HttpStreamRequest::StreamType stream_type);
|
|
|
| // Preconnect will attempt to request |num_streams| sockets from the
|
| // appropriate ClientSocketPool.
|
| @@ -84,7 +89,7 @@ class HttpStreamFactoryImpl::Job {
|
| void Resume(Job* job, const base::TimeDelta& delay);
|
|
|
| // Used to detach the Job from |request|.
|
| - void Orphan(const Request* request);
|
| + void Orphan();
|
|
|
| void SetPriority(RequestPriority priority);
|
|
|
| @@ -95,16 +100,16 @@ class HttpStreamFactoryImpl::Job {
|
| const BoundNetLog& net_log() const { return net_log_; }
|
| HttpStreamRequest::StreamType stream_type() const { return stream_type_; }
|
|
|
| + HttpStream* ReleaseStream() { return stream_.release(); }
|
| +
|
| + BidirectionalStreamImpl* ReleaseBidirectionalStream() {
|
| + return bidirectional_stream_impl_.release();
|
| + }
|
| +
|
| const SSLConfig& server_ssl_config() const;
|
| const SSLConfig& proxy_ssl_config() const;
|
| const ProxyInfo& proxy_info() const;
|
|
|
| - // Indicates whether or not this job is performing a preconnect.
|
| - bool IsPreconnecting() const;
|
| -
|
| - // Indicates whether or not this Job has been orphaned by a Request.
|
| - bool IsOrphaned() const;
|
| -
|
| // Called to indicate that this job succeeded, and some other jobs
|
| // will be orphaned.
|
| void ReportJobSucceededForRequest();
|
| @@ -112,6 +117,8 @@ class HttpStreamFactoryImpl::Job {
|
| // Marks that the other |job| has completed.
|
| void MarkOtherJobComplete(const Job& job);
|
|
|
| + JobType job_type() const { return job_type_; }
|
| +
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(HttpStreamFactoryImplRequestTest, DelayMainJob);
|
|
|
| @@ -318,8 +325,6 @@ class HttpStreamFactoryImpl::Job {
|
| const AddressList& addresses,
|
| const BoundNetLog& net_log);
|
|
|
| - Request* request_;
|
| -
|
| const HttpRequestInfo request_info_;
|
| RequestPriority priority_;
|
| ProxyInfo proxy_info_;
|
| @@ -330,7 +335,6 @@ class HttpStreamFactoryImpl::Job {
|
| CompletionCallback io_callback_;
|
| std::unique_ptr<ClientSocketHandle> connection_;
|
| HttpNetworkSession* const session_;
|
| - HttpStreamFactoryImpl* const stream_factory_;
|
| State next_state_;
|
| ProxyService::PacRequest* pac_request_;
|
| SSLInfo ssl_info_;
|
| @@ -349,6 +353,11 @@ class HttpStreamFactoryImpl::Job {
|
| // AlternativeService for the other Job if this is not an alternative Job.
|
| AlternativeService other_job_alternative_service_;
|
|
|
| + // Unowned. |this| job is owned by |job_controller_|.
|
| + JobController* job_controller_;
|
| +
|
| + JobType job_type_;
|
| +
|
| // This is the Job we're dependent on. It will notify us if/when it's OK to
|
| // proceed.
|
| Job* blocking_job_;
|
|
|