| 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 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1640 return std::unique_ptr<ResourceHandler>(); | 1640 return std::unique_ptr<ResourceHandler>(); |
| 1641 } | 1641 } |
| 1642 | 1642 |
| 1643 DCHECK(!mojo_request.is_pending()); | 1643 DCHECK(!mojo_request.is_pending()); |
| 1644 DCHECK(!url_loader_client); | 1644 DCHECK(!url_loader_client); |
| 1645 handler.reset(new SyncResourceHandler(request, sync_result_handler, this)); | 1645 handler.reset(new SyncResourceHandler(request, sync_result_handler, this)); |
| 1646 } else { | 1646 } else { |
| 1647 if (mojo_request.is_pending()) { | 1647 if (mojo_request.is_pending()) { |
| 1648 handler.reset(new MojoAsyncResourceHandler(request, this, | 1648 handler.reset(new MojoAsyncResourceHandler(request, this, |
| 1649 std::move(mojo_request), | 1649 std::move(mojo_request), |
| 1650 std::move(url_loader_client))); | 1650 std::move(url_loader_client), |
| 1651 request_data.resource_type)); |
| 1651 } else { | 1652 } else { |
| 1652 handler.reset(new AsyncResourceHandler(request, this)); | 1653 handler.reset(new AsyncResourceHandler(request, this)); |
| 1653 } | 1654 } |
| 1654 | 1655 |
| 1655 // The RedirectToFileResourceHandler depends on being next in the chain. | 1656 // The RedirectToFileResourceHandler depends on being next in the chain. |
| 1656 if (request_data.download_to_file) { | 1657 if (request_data.download_to_file) { |
| 1657 handler.reset( | 1658 handler.reset( |
| 1658 new RedirectToFileResourceHandler(std::move(handler), request)); | 1659 new RedirectToFileResourceHandler(std::move(handler), request)); |
| 1659 } | 1660 } |
| 1660 } | 1661 } |
| (...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2831 &throttles); | 2832 &throttles); |
| 2832 if (!throttles.empty()) { | 2833 if (!throttles.empty()) { |
| 2833 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, | 2834 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, |
| 2834 std::move(throttles))); | 2835 std::move(throttles))); |
| 2835 } | 2836 } |
| 2836 } | 2837 } |
| 2837 return handler; | 2838 return handler; |
| 2838 } | 2839 } |
| 2839 | 2840 |
| 2840 } // namespace content | 2841 } // namespace content |
| OLD | NEW |