Chromium Code Reviews| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 #include <google/protobuf/repeated_field.h> | 85 #include <google/protobuf/repeated_field.h> |
| 86 #else | 86 #else |
| 87 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" | 87 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" |
| 88 #endif | 88 #endif |
| 89 | 89 |
| 90 #if defined(OS_ANDROID) | 90 #if defined(OS_ANDROID) |
| 91 #include "chrome/browser/android/intercept_download_resource_throttle.h" | 91 #include "chrome/browser/android/intercept_download_resource_throttle.h" |
| 92 #include "components/navigation_interception/intercept_navigation_delegate.h" | 92 #include "components/navigation_interception/intercept_navigation_delegate.h" |
| 93 #endif | 93 #endif |
| 94 | 94 |
| 95 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) | |
| 96 #include "components/data_reduction_proxy/content/browser/data_reduction_proxy_d ebug_resource_throttle.h" | |
| 97 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d ata.h" | |
| 98 #endif | |
| 99 | |
| 95 #if defined(OS_CHROMEOS) | 100 #if defined(OS_CHROMEOS) |
| 96 #include "chrome/browser/chromeos/login/signin/merge_session_throttle.h" | 101 #include "chrome/browser/chromeos/login/signin/merge_session_throttle.h" |
| 97 // TODO(oshima): Enable this for other platforms. | 102 // TODO(oshima): Enable this for other platforms. |
| 98 #include "chrome/browser/renderer_host/offline_resource_throttle.h" | 103 #include "chrome/browser/renderer_host/offline_resource_throttle.h" |
| 99 #endif | 104 #endif |
| 100 | 105 |
| 101 using content::BrowserThread; | 106 using content::BrowserThread; |
| 102 using content::RenderViewHost; | 107 using content::RenderViewHost; |
| 103 using content::ResourceDispatcherHostLoginDelegate; | 108 using content::ResourceDispatcherHostLoginDelegate; |
| 104 using content::ResourceRequestInfo; | 109 using content::ResourceRequestInfo; |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 520 content::ResourceThrottle* throttle = | 525 content::ResourceThrottle* throttle = |
| 521 SafeBrowsingResourceThrottleFactory::Create(request, | 526 SafeBrowsingResourceThrottleFactory::Create(request, |
| 522 resource_context, | 527 resource_context, |
| 523 resource_type, | 528 resource_type, |
| 524 safe_browsing_.get()); | 529 safe_browsing_.get()); |
| 525 if (throttle) | 530 if (throttle) |
| 526 throttles->push_back(throttle); | 531 throttles->push_back(throttle); |
| 527 } | 532 } |
| 528 #endif | 533 #endif |
| 529 | 534 |
| 535 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) | |
| 536 scoped_ptr<content::ResourceThrottle> data_reduction_proxy_throttle = | |
| 537 data_reduction_proxy::DataReductionProxyDebugResourceThrottle:: | |
| 538 MaybeCreate( | |
| 539 io_data->IsDataReductionProxyEnabled(), | |
| 540 request, resource_type, | |
| 541 io_data->data_reduction_proxy_io_data()->debug_ui_service(), | |
| 542 io_data->data_reduction_proxy_io_data()->params()); | |
|
mmenke
2015/02/02 15:45:53
Rather than dig into data_reduction_proxy_io_data'
megjablon
2015/02/03 23:21:27
Done.
| |
| 543 if (data_reduction_proxy_throttle) | |
| 544 throttles->push_back(data_reduction_proxy_throttle.release()); | |
| 545 #endif | |
| 546 | |
| 530 #if defined(ENABLE_SUPERVISED_USERS) | 547 #if defined(ENABLE_SUPERVISED_USERS) |
| 531 bool is_subresource_request = | 548 bool is_subresource_request = |
| 532 resource_type != content::RESOURCE_TYPE_MAIN_FRAME; | 549 resource_type != content::RESOURCE_TYPE_MAIN_FRAME; |
| 533 throttles->push_back(new SupervisedUserResourceThrottle( | 550 throttles->push_back(new SupervisedUserResourceThrottle( |
| 534 request, !is_subresource_request, | 551 request, !is_subresource_request, |
| 535 io_data->supervised_user_url_filter())); | 552 io_data->supervised_user_url_filter())); |
| 536 #endif | 553 #endif |
| 537 | 554 |
| 538 #if defined(ENABLE_EXTENSIONS) | 555 #if defined(ENABLE_EXTENSIONS) |
| 539 content::ResourceThrottle* throttle = | 556 content::ResourceThrottle* throttle = |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 754 url_request->GetTotalReceivedBytes())); | 771 url_request->GetTotalReceivedBytes())); |
| 755 } | 772 } |
| 756 } | 773 } |
| 757 | 774 |
| 758 // static | 775 // static |
| 759 void ChromeResourceDispatcherHostDelegate:: | 776 void ChromeResourceDispatcherHostDelegate:: |
| 760 SetExternalProtocolHandlerDelegateForTesting( | 777 SetExternalProtocolHandlerDelegateForTesting( |
| 761 ExternalProtocolHandler::Delegate* delegate) { | 778 ExternalProtocolHandler::Delegate* delegate) { |
| 762 g_external_protocol_handler_delegate = delegate; | 779 g_external_protocol_handler_delegate = delegate; |
| 763 } | 780 } |
| OLD | NEW |