| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
| 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // latency. Even if the http connection was not reused, establishing a new | 112 // latency. Even if the http connection was not reused, establishing a new |
| 113 // http connection is typically faster than npn-spdy, since npn-spdy | 113 // http connection is typically faster than npn-spdy, since npn-spdy |
| 114 // requires a SSL handshake. Therefore, we start both the http and the | 114 // requires a SSL handshake. Therefore, we start both the http and the |
| 115 // npn-spdy jobs in parallel. In order not to unnecessarily waste sockets, | 115 // npn-spdy jobs in parallel. In order not to unnecessarily waste sockets, |
| 116 // we have the http job block on the npn-spdy job after proxy resolution. | 116 // we have the http job block on the npn-spdy job after proxy resolution. |
| 117 // The npn-spdy job will Resume() the http job if, in | 117 // The npn-spdy job will Resume() the http job if, in |
| 118 // STATE_INIT_CONNECTION_COMPLETE, it detects an error or does not find an | 118 // STATE_INIT_CONNECTION_COMPLETE, it detects an error or does not find an |
| 119 // existing SpdySession. In that case, the http and npn-spdy jobs will race. | 119 // existing SpdySession. In that case, the http and npn-spdy jobs will race. |
| 120 STATE_WAIT_FOR_JOB, | 120 STATE_WAIT_FOR_JOB, |
| 121 STATE_WAIT_FOR_JOB_COMPLETE, | 121 STATE_WAIT_FOR_JOB_COMPLETE, |
| 122 | |
| 123 STATE_INIT_CONNECTION, | 122 STATE_INIT_CONNECTION, |
| 124 STATE_INIT_CONNECTION_COMPLETE, | 123 STATE_INIT_CONNECTION_COMPLETE, |
| 125 STATE_WAITING_USER_ACTION, | 124 STATE_WAITING_USER_ACTION, |
| 126 STATE_RESTART_TUNNEL_AUTH, | 125 STATE_RESTART_TUNNEL_AUTH, |
| 127 STATE_RESTART_TUNNEL_AUTH_COMPLETE, | 126 STATE_RESTART_TUNNEL_AUTH_COMPLETE, |
| 128 STATE_CREATE_STREAM, | 127 STATE_CREATE_STREAM, |
| 129 STATE_CREATE_STREAM_COMPLETE, | 128 STATE_CREATE_STREAM_COMPLETE, |
| 130 STATE_DRAIN_BODY_FOR_AUTH_RESTART, | 129 STATE_DRAIN_BODY_FOR_AUTH_RESTART, |
| 131 STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE, | 130 STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE, |
| 132 STATE_DONE, | 131 STATE_DONE, |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 bool existing_available_pipeline_; | 331 bool existing_available_pipeline_; |
| 333 | 332 |
| 334 base::WeakPtrFactory<Job> ptr_factory_; | 333 base::WeakPtrFactory<Job> ptr_factory_; |
| 335 | 334 |
| 336 DISALLOW_COPY_AND_ASSIGN(Job); | 335 DISALLOW_COPY_AND_ASSIGN(Job); |
| 337 }; | 336 }; |
| 338 | 337 |
| 339 } // namespace net | 338 } // namespace net |
| 340 | 339 |
| 341 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 340 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
| OLD | NEW |