| 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 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 const std::string& http_method, | 1167 const std::string& http_method, |
| 1168 const std::string& mime_type, | 1168 const std::string& mime_type, |
| 1169 ResourceType::Type resource_type) { | 1169 ResourceType::Type resource_type) { |
| 1170 if (!url.is_valid() || !(url.SchemeIs("http") || url.SchemeIs("https"))) | 1170 if (!url.is_valid() || !(url.SchemeIs("http") || url.SchemeIs("https"))) |
| 1171 return; | 1171 return; |
| 1172 | 1172 |
| 1173 filter_->GetURLRequestContext(resource_type)->http_transaction_factory()-> | 1173 filter_->GetURLRequestContext(resource_type)->http_transaction_factory()-> |
| 1174 GetCache()->OnExternalCacheHit(url, http_method); | 1174 GetCache()->OnExternalCacheHit(url, http_method); |
| 1175 } | 1175 } |
| 1176 | 1176 |
| 1177 void ResourceDispatcherHostImpl::OnRenderViewHostCreated( |
| 1178 int child_id, |
| 1179 int route_id) { |
| 1180 scheduler_->OnClientCreated(child_id, route_id); |
| 1181 } |
| 1182 |
| 1183 void ResourceDispatcherHostImpl::OnRenderViewHostDeleted( |
| 1184 int child_id, |
| 1185 int route_id) { |
| 1186 CancelRequestsForRoute(child_id, route_id); |
| 1187 scheduler_->OnClientDeleted(child_id, route_id); |
| 1188 } |
| 1189 |
| 1177 // This function is only used for saving feature. | 1190 // This function is only used for saving feature. |
| 1178 void ResourceDispatcherHostImpl::BeginSaveFile( | 1191 void ResourceDispatcherHostImpl::BeginSaveFile( |
| 1179 const GURL& url, | 1192 const GURL& url, |
| 1180 const Referrer& referrer, | 1193 const Referrer& referrer, |
| 1181 int child_id, | 1194 int child_id, |
| 1182 int route_id, | 1195 int route_id, |
| 1183 ResourceContext* context) { | 1196 ResourceContext* context) { |
| 1184 if (is_shutdown_) | 1197 if (is_shutdown_) |
| 1185 return; | 1198 return; |
| 1186 | 1199 |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1697 DelegateMap::iterator it = delegate_map_.find(id); | 1710 DelegateMap::iterator it = delegate_map_.find(id); |
| 1698 DCHECK(it->second->HasObserver(delegate)); | 1711 DCHECK(it->second->HasObserver(delegate)); |
| 1699 it->second->RemoveObserver(delegate); | 1712 it->second->RemoveObserver(delegate); |
| 1700 if (it->second->size() == 0) { | 1713 if (it->second->size() == 0) { |
| 1701 delete it->second; | 1714 delete it->second; |
| 1702 delegate_map_.erase(it); | 1715 delegate_map_.erase(it); |
| 1703 } | 1716 } |
| 1704 } | 1717 } |
| 1705 | 1718 |
| 1706 } // namespace content | 1719 } // namespace content |
| OLD | NEW |