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

Unified Diff: net/http/http_stream_factory_impl_job.h

Issue 1952423002: JobController 2: Remove reference between HttpStreamFactoryImpl::Jobs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Job_Controller_1
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
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 7341379f7b29ceddcacded52046b597099728b92..6980d820cc38d97fac3f141b2513de69fd6216fb 100644
--- a/net/http/http_stream_factory_impl_job.h
+++ b/net/http/http_stream_factory_impl_job.h
@@ -42,6 +42,7 @@ class HttpStreamFactoryImpl::Job {
public:
// Constructor for non-alternative Job.
Job(JobController* job_controller,
+ JobType job_type,
HttpNetworkSession* session,
const HttpRequestInfo& request_info,
RequestPriority priority,
@@ -52,6 +53,7 @@ class HttpStreamFactoryImpl::Job {
NetLog* net_log);
// Constructor for alternative Job.
Job(JobController* job_controller,
+ JobType job_type,
HttpNetworkSession* session,
const HttpRequestInfo& request_info,
RequestPriority priority,
@@ -74,14 +76,11 @@ class HttpStreamFactoryImpl::Job {
int RestartTunnelWithProxyAuth(const AuthCredentials& credentials);
LoadState GetLoadState() const;
- // Tells |this| to wait for |job| to resume it.
- void WaitFor(Job* job);
-
// Tells |this| that |job| has determined it still needs to continue
// connecting, so allow |this| to continue after the specified |delay|. If
// this is not called, then |request_| is expected to cancel |this| by
// deleting it.
- void Resume(Job* job, const base::TimeDelta& delay);
+ void Resume(const base::TimeDelta& delay);
// Used to detach the Job from |request|.
void Orphan(const Request* request);
@@ -102,8 +101,8 @@ class HttpStreamFactoryImpl::Job {
// 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 { return orphaned_; };
+ // Indicates whether or not this job has been orphaned by a Request.
+ bool IsOrphaned() const { return orphaned_; }
// Called to indicate that this job succeeded, and some other jobs
// will be orphaned.
@@ -113,6 +112,8 @@ class HttpStreamFactoryImpl::Job {
void MarkOtherJobComplete(const Job& job);
private:
+ friend class JobController;
Ryan Hamilton 2016/05/06 21:33:14 Can we get away without this friendship?
Zhongyi Shi 2016/05/13 00:31:25 Done.
+
FRIEND_TEST_ALL_PREFIXES(HttpStreamFactoryImplRequestTest, DelayMainJob);
enum State {
@@ -348,14 +349,7 @@ class HttpStreamFactoryImpl::Job {
JobController* job_controller_;
- // This is the Job we're dependent on. It will notify us if/when it's OK to
- // proceed.
- Job* blocking_job_;
-
- // |waiting_job_| is a Job waiting to see if |this| can reuse a connection.
- // If |this| is unable to do so, we'll notify |waiting_job_| that it's ok to
- // proceed and then race the two Jobs.
- Job* waiting_job_;
+ JobType job_type_;
base::TimeDelta wait_time_;

Powered by Google App Engine
This is Rietveld 408576698