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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 return true; | 534 return true; |
535 #endif | 535 #endif |
536 } | 536 } |
537 | 537 |
538 void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles( | 538 void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles( |
539 net::URLRequest* request, | 539 net::URLRequest* request, |
540 content::ResourceContext* resource_context, | 540 content::ResourceContext* resource_context, |
541 ResourceType resource_type, | 541 ResourceType resource_type, |
542 ScopedVector<content::ResourceThrottle>* throttles) { | 542 ScopedVector<content::ResourceThrottle>* throttles) { |
543 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); | 543 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); |
544 #if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING) | 544 #if defined(SAFE_BROWSING_SERVICE) |
545 // Insert safe browsing at the front of the list, so it gets to decide on | 545 // Insert safe browsing at the front of the list, so it gets to decide on |
546 // policies first. | 546 // policies first. |
547 if (io_data->safe_browsing_enabled()->GetValue() | 547 if (io_data->safe_browsing_enabled()->GetValue() |
548 #if defined(OS_ANDROID) | 548 #if defined(OS_ANDROID) |
549 || io_data->IsDataReductionProxyEnabled() | 549 || io_data->IsDataReductionProxyEnabled() |
550 #endif | 550 #endif |
551 ) { | 551 ) { |
552 content::ResourceThrottle* throttle = | 552 content::ResourceThrottle* throttle = |
553 SafeBrowsingResourceThrottleFactory::Create(request, | 553 SafeBrowsingResourceThrottleFactory::Create(request, |
554 resource_context, | 554 resource_context, |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 url_request->GetTotalReceivedBytes())); | 761 url_request->GetTotalReceivedBytes())); |
762 } | 762 } |
763 } | 763 } |
764 | 764 |
765 // static | 765 // static |
766 void ChromeResourceDispatcherHostDelegate:: | 766 void ChromeResourceDispatcherHostDelegate:: |
767 SetExternalProtocolHandlerDelegateForTesting( | 767 SetExternalProtocolHandlerDelegateForTesting( |
768 ExternalProtocolHandler::Delegate* delegate) { | 768 ExternalProtocolHandler::Delegate* delegate) { |
769 g_external_protocol_handler_delegate = delegate; | 769 g_external_protocol_handler_delegate = delegate; |
770 } | 770 } |
OLD | NEW |