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/renderer_host/resource_dispatcher_host_impl.h" | 7 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 rvh->OnSwapOutACK(timed_out); | 269 rvh->OnSwapOutACK(timed_out); |
270 } | 270 } |
271 | 271 |
272 net::Error CallbackAndReturn( | 272 net::Error CallbackAndReturn( |
273 const DownloadResourceHandler::OnStartedCallback& started_cb, | 273 const DownloadResourceHandler::OnStartedCallback& started_cb, |
274 net::Error net_error) { | 274 net::Error net_error) { |
275 if (started_cb.is_null()) | 275 if (started_cb.is_null()) |
276 return net_error; | 276 return net_error; |
277 BrowserThread::PostTask( | 277 BrowserThread::PostTask( |
278 BrowserThread::UI, FROM_HERE, | 278 BrowserThread::UI, FROM_HERE, |
279 base::Bind(started_cb, DownloadId::Invalid(), net_error)); | 279 base::Bind(started_cb, static_cast<DownloadItem*>(NULL), net_error)); |
280 | 280 |
281 return net_error; | 281 return net_error; |
282 } | 282 } |
283 | 283 |
284 int BuildLoadFlagsForRequest(const ResourceHostMsg_Request& request_data, | 284 int BuildLoadFlagsForRequest(const ResourceHostMsg_Request& request_data, |
285 int child_id, bool is_sync_load) { | 285 int child_id, bool is_sync_load) { |
286 int load_flags = request_data.load_flags; | 286 int load_flags = request_data.load_flags; |
287 | 287 |
288 // Although EV status is irrelevant to sub-frames and sub-resources, we have | 288 // Although EV status is irrelevant to sub-frames and sub-resources, we have |
289 // to perform EV certificate verification on all resources because an HTTP | 289 // to perform EV certificate verification on all resources because an HTTP |
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1723 | 1723 |
1724 return i->second.get(); | 1724 return i->second.get(); |
1725 } | 1725 } |
1726 | 1726 |
1727 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, | 1727 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, |
1728 int request_id) const { | 1728 int request_id) const { |
1729 return GetLoader(GlobalRequestID(child_id, request_id)); | 1729 return GetLoader(GlobalRequestID(child_id, request_id)); |
1730 } | 1730 } |
1731 | 1731 |
1732 } // namespace content | 1732 } // namespace content |
OLD | NEW |