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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 #include "net/base/load_timing_info.h" | 58 #include "net/base/load_timing_info.h" |
59 #include "net/base/request_priority.h" | 59 #include "net/base/request_priority.h" |
60 #include "net/http/http_response_headers.h" | 60 #include "net/http/http_response_headers.h" |
61 #include "net/url_request/url_request.h" | 61 #include "net/url_request/url_request.h" |
62 | 62 |
63 #if defined(ENABLE_CONFIGURATION_POLICY) | 63 #if defined(ENABLE_CONFIGURATION_POLICY) |
64 #include "components/policy/core/common/cloud/policy_header_io_helper.h" | 64 #include "components/policy/core/common/cloud/policy_header_io_helper.h" |
65 #endif | 65 #endif |
66 | 66 |
67 #if defined(ENABLE_MANAGED_USERS) | 67 #if defined(ENABLE_MANAGED_USERS) |
68 #include "chrome/browser/managed_mode/managed_mode_resource_throttle.h" | 68 #include "chrome/browser/supervised_user/supervised_user_resource_throttle.h" |
69 #endif | 69 #endif |
70 | 70 |
71 #if defined(USE_SYSTEM_PROTOBUF) | 71 #if defined(USE_SYSTEM_PROTOBUF) |
72 #include <google/protobuf/repeated_field.h> | 72 #include <google/protobuf/repeated_field.h> |
73 #else | 73 #else |
74 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" | 74 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" |
75 #endif | 75 #endif |
76 | 76 |
77 #if defined(OS_ANDROID) | 77 #if defined(OS_ANDROID) |
78 #include "chrome/browser/android/intercept_download_resource_throttle.h" | 78 #include "chrome/browser/android/intercept_download_resource_throttle.h" |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 resource_context, | 488 resource_context, |
489 is_subresource_request, | 489 is_subresource_request, |
490 safe_browsing_.get()); | 490 safe_browsing_.get()); |
491 if (throttle) | 491 if (throttle) |
492 throttles->push_back(throttle); | 492 throttles->push_back(throttle); |
493 } | 493 } |
494 #endif | 494 #endif |
495 | 495 |
496 #if defined(ENABLE_MANAGED_USERS) | 496 #if defined(ENABLE_MANAGED_USERS) |
497 bool is_subresource_request = resource_type != ResourceType::MAIN_FRAME; | 497 bool is_subresource_request = resource_type != ResourceType::MAIN_FRAME; |
498 throttles->push_back(new ManagedModeResourceThrottle( | 498 throttles->push_back(new SupervisedUserResourceThrottle( |
499 request, !is_subresource_request, | 499 request, !is_subresource_request, |
500 io_data->managed_mode_url_filter())); | 500 io_data->supervised_user_url_filter())); |
501 #endif | 501 #endif |
502 | 502 |
503 content::ResourceThrottle* throttle = | 503 content::ResourceThrottle* throttle = |
504 user_script_listener_->CreateResourceThrottle(request->url(), | 504 user_script_listener_->CreateResourceThrottle(request->url(), |
505 resource_type); | 505 resource_type); |
506 if (throttle) | 506 if (throttle) |
507 throttles->push_back(throttle); | 507 throttles->push_back(throttle); |
508 | 508 |
509 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); | 509 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); |
510 if (info->GetVisibilityState() == blink::WebPageVisibilityStatePrerender) { | 510 if (info->GetVisibilityState() == blink::WebPageVisibilityStatePrerender) { |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 url_request->GetTotalReceivedBytes())); | 716 url_request->GetTotalReceivedBytes())); |
717 } | 717 } |
718 } | 718 } |
719 | 719 |
720 // static | 720 // static |
721 void ChromeResourceDispatcherHostDelegate:: | 721 void ChromeResourceDispatcherHostDelegate:: |
722 SetExternalProtocolHandlerDelegateForTesting( | 722 SetExternalProtocolHandlerDelegateForTesting( |
723 ExternalProtocolHandler::Delegate* delegate) { | 723 ExternalProtocolHandler::Delegate* delegate) { |
724 g_external_protocol_handler_delegate = delegate; | 724 g_external_protocol_handler_delegate = delegate; |
725 } | 725 } |
OLD | NEW |