| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/loader/navigation_resource_handler.h" | 5 #include "content/browser/loader/navigation_resource_handler.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "content/browser/loader/navigation_url_loader_impl_core.h" | 10 #include "content/browser/loader/navigation_url_loader_impl_core.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 cloned_data = navigation_data->Clone(); | 122 cloned_data = navigation_data->Clone(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 SSLStatus ssl_status; | 125 SSLStatus ssl_status; |
| 126 if (request()->ssl_info().cert.get()) { | 126 if (request()->ssl_info().cert.get()) { |
| 127 GetSSLStatusForRequest(request()->url(), request()->ssl_info(), | 127 GetSSLStatusForRequest(request()->url(), request()->ssl_info(), |
| 128 info->GetChildID(), &ssl_status); | 128 info->GetChildID(), &ssl_status); |
| 129 } | 129 } |
| 130 | 130 |
| 131 core_->NotifyResponseStarted(response, writer_.stream()->CreateHandle(), | 131 core_->NotifyResponseStarted(response, writer_.stream()->CreateHandle(), |
| 132 ssl_status, std::move(cloned_data)); | 132 ssl_status, std::move(cloned_data), |
| 133 info->GetGlobalRequestID(), info->IsDownload(), |
| 134 info->is_stream()); |
| 133 // Don't defer stream based requests. This includes requests initiated via | 135 // Don't defer stream based requests. This includes requests initiated via |
| 134 // mime type sniffing, etc. | 136 // mime type sniffing, etc. |
| 135 // TODO(ananta) | 137 // TODO(ananta) |
| 136 // Make sure that the requests go through the throttle checks. Currently this | 138 // Make sure that the requests go through the throttle checks. Currently this |
| 137 // does not work as the InterceptingResourceHandler is above us and hence it | 139 // does not work as the InterceptingResourceHandler is above us and hence it |
| 138 // does not expect the old handler to defer the request. | 140 // does not expect the old handler to defer the request. |
| 139 if (!info->is_stream()) | 141 if (!info->is_stream()) |
| 140 *defer = true; | 142 *defer = true; |
| 141 return true; | 143 return true; |
| 142 } | 144 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 NOTREACHED(); | 180 NOTREACHED(); |
| 179 } | 181 } |
| 180 | 182 |
| 181 void NavigationResourceHandler::DetachFromCore() { | 183 void NavigationResourceHandler::DetachFromCore() { |
| 182 DCHECK(core_); | 184 DCHECK(core_); |
| 183 core_->set_resource_handler(nullptr); | 185 core_->set_resource_handler(nullptr); |
| 184 core_ = nullptr; | 186 core_ = nullptr; |
| 185 } | 187 } |
| 186 | 188 |
| 187 } // namespace content | 189 } // namespace content |
| OLD | NEW |