OLD | NEW |
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 #include "net/http/http_stream_factory_impl_job_controller.h" | 5 #include "net/http/http_stream_factory_impl_job_controller.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/metrics/histogram_macros.h" | 12 #include "base/metrics/histogram_macros.h" |
13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "base/trace_event/memory_usage_estimator.h" | 16 #include "base/trace_event/memory_usage_estimator.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "net/base/host_mapping_rules.h" | 18 #include "net/base/host_mapping_rules.h" |
19 #include "net/base/proxy_delegate.h" | 19 #include "net/base/proxy_delegate.h" |
20 #include "net/http/bidirectional_stream_impl.h" | 20 #include "net/http/bidirectional_stream_impl.h" |
21 #include "net/http/transport_security_state.h" | 21 #include "net/http/transport_security_state.h" |
22 #include "net/log/net_log_capture_mode.h" | 22 #include "net/log/net_log_capture_mode.h" |
23 #include "net/log/net_log_event_type.h" | 23 #include "net/log/net_log_event_type.h" |
24 #include "net/log/net_log_source.h" | 24 #include "net/log/net_log_source.h" |
25 #include "net/log/net_log_with_source.h" | 25 #include "net/log/net_log_with_source.h" |
26 #include "net/proxy/proxy_server.h" | 26 #include "net/proxy/proxy_server.h" |
27 #include "net/spdy/spdy_session.h" | 27 #include "net/spdy/chromium/spdy_session.h" |
28 #include "url/url_constants.h" | 28 #include "url/url_constants.h" |
29 | 29 |
30 namespace net { | 30 namespace net { |
31 | 31 |
32 // The maximum time to wait for the alternate job to complete before resuming | 32 // The maximum time to wait for the alternate job to complete before resuming |
33 // the main job. | 33 // the main job. |
34 const int kMaxDelayTimeForMainJobSecs = 3; | 34 const int kMaxDelayTimeForMainJobSecs = 3; |
35 | 35 |
36 std::unique_ptr<base::Value> NetLogJobControllerCallback( | 36 std::unique_ptr<base::Value> NetLogJobControllerCallback( |
37 const GURL* url, | 37 const GURL* url, |
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 return; | 1129 return; |
1130 DCHECK(alternative_job_->alternative_proxy_server().is_valid()); | 1130 DCHECK(alternative_job_->alternative_proxy_server().is_valid()); |
1131 alternative_job_->Start(request_->stream_type()); | 1131 alternative_job_->Start(request_->stream_type()); |
1132 } | 1132 } |
1133 | 1133 |
1134 bool HttpStreamFactoryImpl::JobController::IsJobOrphaned(Job* job) const { | 1134 bool HttpStreamFactoryImpl::JobController::IsJobOrphaned(Job* job) const { |
1135 return !request_ || (job_bound_ && bound_job_ != job); | 1135 return !request_ || (job_bound_ && bound_job_ != job); |
1136 } | 1136 } |
1137 | 1137 |
1138 } // namespace net | 1138 } // namespace net |
OLD | NEW |