| 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 // 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 "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 true); // is_async | 1184 true); // is_async |
| 1185 } | 1185 } |
| 1186 | 1186 |
| 1187 | 1187 |
| 1188 void ResourceDispatcherHostImpl::OnDidLoadResourceFromMemoryCache( | 1188 void ResourceDispatcherHostImpl::OnDidLoadResourceFromMemoryCache( |
| 1189 const GURL& url, | 1189 const GURL& url, |
| 1190 const std::string& security_info, | 1190 const std::string& security_info, |
| 1191 const std::string& http_method, | 1191 const std::string& http_method, |
| 1192 const std::string& mime_type, | 1192 const std::string& mime_type, |
| 1193 ResourceType::Type resource_type) { | 1193 ResourceType::Type resource_type) { |
| 1194 if (!url.is_valid() || !(url.SchemeIs("http") || url.SchemeIs("https"))) | 1194 if (!url.is_valid() || !url.SchemeIsHttp()) |
| 1195 return; | 1195 return; |
| 1196 | 1196 |
| 1197 filter_->GetURLRequestContext(resource_type)->http_transaction_factory()-> | 1197 filter_->GetURLRequestContext(resource_type)->http_transaction_factory()-> |
| 1198 GetCache()->OnExternalCacheHit(url, http_method); | 1198 GetCache()->OnExternalCacheHit(url, http_method); |
| 1199 } | 1199 } |
| 1200 | 1200 |
| 1201 void ResourceDispatcherHostImpl::OnRenderViewHostCreated( | 1201 void ResourceDispatcherHostImpl::OnRenderViewHostCreated( |
| 1202 int child_id, | 1202 int child_id, |
| 1203 int route_id) { | 1203 int route_id) { |
| 1204 scheduler_->OnClientCreated(child_id, route_id); | 1204 scheduler_->OnClientCreated(child_id, route_id); |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1871 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) | 1871 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) |
| 1872 && !policy->CanReadRawCookies(child_id)) { | 1872 && !policy->CanReadRawCookies(child_id)) { |
| 1873 VLOG(1) << "Denied unauthorized request for raw headers"; | 1873 VLOG(1) << "Denied unauthorized request for raw headers"; |
| 1874 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; | 1874 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; |
| 1875 } | 1875 } |
| 1876 | 1876 |
| 1877 return load_flags; | 1877 return load_flags; |
| 1878 } | 1878 } |
| 1879 | 1879 |
| 1880 } // namespace content | 1880 } // namespace content |
| OLD | NEW |