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
3 // found in the LICENSE file.
5 #include "content/public/browser/resource_dispatcher_host_delegate.h"
7 #include "content/public/browser/stream_handle.h"
11 bool ResourceDispatcherHostDelegate::ShouldBeginRequest(
14 const std::string
& method
,
16 ResourceType::Type resource_type
,
17 ResourceContext
* resource_context
,
18 const Referrer
& referrer
) {
22 void ResourceDispatcherHostDelegate::RequestBeginning(
23 net::URLRequest
* request
,
24 ResourceContext
* resource_context
,
25 appcache::AppCacheService
* appcache_service
,
26 ResourceType::Type resource_type
,
29 bool is_continuation_of_transferred_request
,
30 ScopedVector
<ResourceThrottle
>* throttles
) {
33 void ResourceDispatcherHostDelegate::DownloadStarting(
34 net::URLRequest
* request
,
35 ResourceContext
* resource_context
,
39 bool is_content_initiated
,
41 ScopedVector
<ResourceThrottle
>* throttles
) {
44 bool ResourceDispatcherHostDelegate::AcceptSSLClientCertificateRequest(
45 net::URLRequest
* request
,
46 net::SSLCertRequestInfo
* cert_request_info
) {
50 bool ResourceDispatcherHostDelegate::AcceptAuthRequest(
51 net::URLRequest
* request
,
52 net::AuthChallengeInfo
* auth_info
) {
56 ResourceDispatcherHostLoginDelegate
*
57 ResourceDispatcherHostDelegate::CreateLoginDelegate(
58 net::AuthChallengeInfo
* auth_info
,
59 net::URLRequest
* request
) {
63 bool ResourceDispatcherHostDelegate::HandleExternalProtocol(const GURL
& url
,
69 bool ResourceDispatcherHostDelegate::ShouldForceDownloadResource(
71 const std::string
& mime_type
) {
75 bool ResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream(
76 content::ResourceContext
* resource_context
,
78 const std::string
& mime_type
,
79 GURL
* security_origin
,
80 std::string
* target_id
) {
84 void ResourceDispatcherHostDelegate::OnStreamCreated(
85 content::ResourceContext
* resource_context
,
86 int render_process_id
,
88 const std::string
& target_id
,
89 scoped_ptr
<StreamHandle
> stream
) {
92 void ResourceDispatcherHostDelegate::OnResponseStarted(
93 net::URLRequest
* request
,
94 ResourceContext
* resource_context
,
95 ResourceResponse
* response
,
96 IPC::Sender
* sender
) {
99 void ResourceDispatcherHostDelegate::OnRequestRedirected(
100 const GURL
& redirect_url
,
101 net::URLRequest
* request
,
102 ResourceContext
* resource_context
,
103 ResourceResponse
* response
) {
106 ResourceDispatcherHostDelegate::ResourceDispatcherHostDelegate() {
109 ResourceDispatcherHostDelegate::~ResourceDispatcherHostDelegate() {
112 } // namespace content