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

Unified Diff: net/http/http_stream_factory_impl_job.h

Issue 245663003: Do not mark alternate-protocol broken unless the main job succeeds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix warning Created 6 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
« no previous file with comments | « net/http/http_server_properties.h ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d4406477f7ea5c6435d7ee74eaf2422da7457433..76492a442937e8cde1fd798451deb5449d8e9c2c 100644
--- a/net/http/http_stream_factory_impl_job.h
+++ b/net/http/http_stream_factory_impl_job.h
@@ -96,6 +96,9 @@ class HttpStreamFactoryImpl::Job {
// will be orphaned.
void ReportJobSuccededForRequest();
+ // Marks that the other |job| has completed.
+ void MarkOtherJobComplete(const Job& job);
+
private:
enum State {
STATE_START,
@@ -133,6 +136,13 @@ class HttpStreamFactoryImpl::Job {
STATE_NONE
};
+ enum JobStatus {
+ STATUS_RUNNING,
+ STATUS_FAILED,
+ STATUS_BROKEN,
+ STATUS_SUCCEEDED
+ };
+
void OnStreamReadyCallback();
void OnWebSocketHandshakeStreamReadyCallback();
// This callback function is called when a new SPDY session is created.
@@ -222,6 +232,8 @@ class HttpStreamFactoryImpl::Job {
bool IsRequestEligibleForPipelining();
+ void MaybeMarkAlternateProtocolBroken();
+
// Record histograms of latency until Connect() completes.
static void LogHttpConnectedMetrics(const ClientSocketHandle& handle);
@@ -331,6 +343,9 @@ class HttpStreamFactoryImpl::Job {
// True if an existing pipeline can handle this job's request.
bool existing_available_pipeline_;
+ JobStatus job_status_;
+ JobStatus other_job_status_;
+
base::WeakPtrFactory<Job> ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(Job);
« no previous file with comments | « net/http/http_server_properties.h ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698