OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
6 | 6 |
7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 response->response_head.response_time = request->response_time(); | 157 response->response_head.response_time = request->response_time(); |
158 response->response_head.headers = request->response_headers(); | 158 response->response_head.headers = request->response_headers(); |
159 request->GetCharset(&response->response_head.charset); | 159 request->GetCharset(&response->response_head.charset); |
160 response->response_head.replace_extension_localization_templates = | 160 response->response_head.replace_extension_localization_templates = |
161 replace_extension_localization_templates; | 161 replace_extension_localization_templates; |
162 response->response_head.content_length = request->GetExpectedContentSize(); | 162 response->response_head.content_length = request->GetExpectedContentSize(); |
163 request->GetMimeType(&response->response_head.mime_type); | 163 request->GetMimeType(&response->response_head.mime_type); |
164 response->response_head.was_fetched_via_spdy = | 164 response->response_head.was_fetched_via_spdy = |
165 request->was_fetched_via_spdy(); | 165 request->was_fetched_via_spdy(); |
166 response->response_head.was_npn_negotiated = request->was_npn_negotiated(); | 166 response->response_head.was_npn_negotiated = request->was_npn_negotiated(); |
| 167 response->response_head.was_alternate_protocol_available = |
| 168 request->was_alternate_protocol_available(); |
167 response->response_head.was_fetched_via_proxy = | 169 response->response_head.was_fetched_via_proxy = |
168 request->was_fetched_via_proxy(); | 170 request->was_fetched_via_proxy(); |
169 appcache::AppCacheInterceptor::GetExtraResponseInfo( | 171 appcache::AppCacheInterceptor::GetExtraResponseInfo( |
170 request, | 172 request, |
171 &response->response_head.appcache_id, | 173 &response->response_head.appcache_id, |
172 &response->response_head.appcache_manifest_url); | 174 &response->response_head.appcache_manifest_url); |
173 } | 175 } |
174 | 176 |
175 // Returns a list of all the possible error codes from the network module. | 177 // Returns a list of all the possible error codes from the network module. |
176 // Note that the error codes are all positive (since histograms expect positive | 178 // Note that the error codes are all positive (since histograms expect positive |
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1812 // them. | 1814 // them. |
1813 case ResourceType::IMAGE: | 1815 case ResourceType::IMAGE: |
1814 return net::LOWEST; | 1816 return net::LOWEST; |
1815 | 1817 |
1816 default: | 1818 default: |
1817 // When new resource types are added, their priority must be considered. | 1819 // When new resource types are added, their priority must be considered. |
1818 NOTREACHED(); | 1820 NOTREACHED(); |
1819 return net::LOW; | 1821 return net::LOW; |
1820 } | 1822 } |
1821 } | 1823 } |
OLD | NEW |