| 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 <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1600 return std::unique_ptr<ResourceHandler>(); | 1600 return std::unique_ptr<ResourceHandler>(); |
| 1601 } | 1601 } |
| 1602 | 1602 |
| 1603 DCHECK(!mojo_request.is_pending()); | 1603 DCHECK(!mojo_request.is_pending()); |
| 1604 DCHECK(!url_loader_client); | 1604 DCHECK(!url_loader_client); |
| 1605 handler.reset(new SyncResourceHandler(request, sync_result_handler, this)); | 1605 handler.reset(new SyncResourceHandler(request, sync_result_handler, this)); |
| 1606 } else { | 1606 } else { |
| 1607 if (mojo_request.is_pending()) { | 1607 if (mojo_request.is_pending()) { |
| 1608 handler.reset(new MojoAsyncResourceHandler(request, this, | 1608 handler.reset(new MojoAsyncResourceHandler(request, this, |
| 1609 std::move(mojo_request), | 1609 std::move(mojo_request), |
| 1610 std::move(url_loader_client), | 1610 std::move(url_loader_client))); |
| 1611 request_data.resource_type)); | |
| 1612 } else { | 1611 } else { |
| 1613 handler.reset(new AsyncResourceHandler(request, this)); | 1612 handler.reset(new AsyncResourceHandler(request, this)); |
| 1614 } | 1613 } |
| 1615 | 1614 |
| 1616 // The RedirectToFileResourceHandler depends on being next in the chain. | 1615 // The RedirectToFileResourceHandler depends on being next in the chain. |
| 1617 if (request_data.download_to_file) { | 1616 if (request_data.download_to_file) { |
| 1618 handler.reset( | 1617 handler.reset( |
| 1619 new RedirectToFileResourceHandler(std::move(handler), request)); | 1618 new RedirectToFileResourceHandler(std::move(handler), request)); |
| 1620 } | 1619 } |
| 1621 } | 1620 } |
| (...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2793 &throttles); | 2792 &throttles); |
| 2794 if (!throttles.empty()) { | 2793 if (!throttles.empty()) { |
| 2795 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, | 2794 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, |
| 2796 std::move(throttles))); | 2795 std::move(throttles))); |
| 2797 } | 2796 } |
| 2798 } | 2797 } |
| 2799 return handler; | 2798 return handler; |
| 2800 } | 2799 } |
| 2801 | 2800 |
| 2802 } // namespace content | 2801 } // namespace content |
| OLD | NEW |