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 #endif |
| 98 |
95 #if defined(OS_CHROMEOS) | 99 #if defined(OS_CHROMEOS) |
96 #include "chrome/browser/chromeos/login/signin/merge_session_throttle.h" | 100 #include "chrome/browser/chromeos/login/signin/merge_session_throttle.h" |
97 // TODO(oshima): Enable this for other platforms. | 101 // TODO(oshima): Enable this for other platforms. |
98 #include "chrome/browser/renderer_host/offline_resource_throttle.h" | 102 #include "chrome/browser/renderer_host/offline_resource_throttle.h" |
99 #endif | 103 #endif |
100 | 104 |
101 using content::BrowserThread; | 105 using content::BrowserThread; |
102 using content::RenderViewHost; | 106 using content::RenderViewHost; |
103 using content::ResourceDispatcherHostLoginDelegate; | 107 using content::ResourceDispatcherHostLoginDelegate; |
104 using content::ResourceRequestInfo; | 108 using content::ResourceRequestInfo; |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 content::ResourceThrottle* throttle = | 524 content::ResourceThrottle* throttle = |
521 SafeBrowsingResourceThrottleFactory::Create(request, | 525 SafeBrowsingResourceThrottleFactory::Create(request, |
522 resource_context, | 526 resource_context, |
523 resource_type, | 527 resource_type, |
524 safe_browsing_.get()); | 528 safe_browsing_.get()); |
525 if (throttle) | 529 if (throttle) |
526 throttles->push_back(throttle); | 530 throttles->push_back(throttle); |
527 } | 531 } |
528 #endif | 532 #endif |
529 | 533 |
| 534 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
| 535 scoped_ptr<content::ResourceThrottle> data_reduction_proxy_throttle = |
| 536 data_reduction_proxy::DataReductionProxyDebugResourceThrottle:: |
| 537 MaybeCreate( |
| 538 request, resource_type, io_data->data_reduction_proxy_io_data()); |
| 539 if (data_reduction_proxy_throttle) |
| 540 throttles->push_back(data_reduction_proxy_throttle.release()); |
| 541 #endif |
| 542 |
530 #if defined(ENABLE_SUPERVISED_USERS) | 543 #if defined(ENABLE_SUPERVISED_USERS) |
531 bool is_subresource_request = | 544 bool is_subresource_request = |
532 resource_type != content::RESOURCE_TYPE_MAIN_FRAME; | 545 resource_type != content::RESOURCE_TYPE_MAIN_FRAME; |
533 throttles->push_back(new SupervisedUserResourceThrottle( | 546 throttles->push_back(new SupervisedUserResourceThrottle( |
534 request, !is_subresource_request, | 547 request, !is_subresource_request, |
535 io_data->supervised_user_url_filter())); | 548 io_data->supervised_user_url_filter())); |
536 #endif | 549 #endif |
537 | 550 |
538 #if defined(ENABLE_EXTENSIONS) | 551 #if defined(ENABLE_EXTENSIONS) |
539 content::ResourceThrottle* throttle = | 552 content::ResourceThrottle* throttle = |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 url_request->GetTotalReceivedBytes())); | 767 url_request->GetTotalReceivedBytes())); |
755 } | 768 } |
756 } | 769 } |
757 | 770 |
758 // static | 771 // static |
759 void ChromeResourceDispatcherHostDelegate:: | 772 void ChromeResourceDispatcherHostDelegate:: |
760 SetExternalProtocolHandlerDelegateForTesting( | 773 SetExternalProtocolHandlerDelegateForTesting( |
761 ExternalProtocolHandler::Delegate* delegate) { | 774 ExternalProtocolHandler::Delegate* delegate) { |
762 g_external_protocol_handler_delegate = delegate; | 775 g_external_protocol_handler_delegate = delegate; |
763 } | 776 } |
OLD | NEW |