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 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" | 5 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 | 506 |
507 if (first_throttle) | 507 if (first_throttle) |
508 throttles->push_back(first_throttle); | 508 throttles->push_back(first_throttle); |
509 | 509 |
510 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) | 510 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
511 scoped_ptr<content::ResourceThrottle> data_reduction_proxy_throttle = | 511 scoped_ptr<content::ResourceThrottle> data_reduction_proxy_throttle = |
512 data_reduction_proxy::DataReductionProxyDebugResourceThrottle:: | 512 data_reduction_proxy::DataReductionProxyDebugResourceThrottle:: |
513 MaybeCreate( | 513 MaybeCreate( |
514 request, resource_type, io_data->data_reduction_proxy_io_data()); | 514 request, resource_type, io_data->data_reduction_proxy_io_data()); |
515 if (data_reduction_proxy_throttle) | 515 if (data_reduction_proxy_throttle) |
516 throttles->push_back(data_reduction_proxy_throttle.Pass()); | 516 throttles->push_back(std::move(data_reduction_proxy_throttle)); |
517 #endif | 517 #endif |
518 | 518 |
519 #if defined(ENABLE_SUPERVISED_USERS) | 519 #if defined(ENABLE_SUPERVISED_USERS) |
520 bool is_subresource_request = | 520 bool is_subresource_request = |
521 resource_type != content::RESOURCE_TYPE_MAIN_FRAME; | 521 resource_type != content::RESOURCE_TYPE_MAIN_FRAME; |
522 throttles->push_back(new SupervisedUserResourceThrottle( | 522 throttles->push_back(new SupervisedUserResourceThrottle( |
523 request, !is_subresource_request, | 523 request, !is_subresource_request, |
524 io_data->supervised_user_url_filter())); | 524 io_data->supervised_user_url_filter())); |
525 #endif | 525 #endif |
526 | 526 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 return data_reduction_proxy_io_data->ShouldEnableLoFiMode(url_request); | 742 return data_reduction_proxy_io_data->ShouldEnableLoFiMode(url_request); |
743 return false; | 743 return false; |
744 } | 744 } |
745 | 745 |
746 // static | 746 // static |
747 void ChromeResourceDispatcherHostDelegate:: | 747 void ChromeResourceDispatcherHostDelegate:: |
748 SetExternalProtocolHandlerDelegateForTesting( | 748 SetExternalProtocolHandlerDelegateForTesting( |
749 ExternalProtocolHandler::Delegate* delegate) { | 749 ExternalProtocolHandler::Delegate* delegate) { |
750 g_external_protocol_handler_delegate = delegate; | 750 g_external_protocol_handler_delegate = delegate; |
751 } | 751 } |
OLD | NEW |