• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #include "content/public/browser/resource_dispatcher_host_delegate.h"
6 
7 #include "content/public/browser/stream_handle.h"
8 
9 namespace content {
10 
ShouldBeginRequest(int child_id,int route_id,const std::string & method,const GURL & url,ResourceType::Type resource_type,ResourceContext * resource_context)11 bool ResourceDispatcherHostDelegate::ShouldBeginRequest(
12     int child_id,
13     int route_id,
14     const std::string& method,
15     const GURL& url,
16     ResourceType::Type resource_type,
17     ResourceContext* resource_context) {
18   return true;
19 }
20 
RequestBeginning(net::URLRequest * request,ResourceContext * resource_context,appcache::AppCacheService * appcache_service,ResourceType::Type resource_type,int child_id,int route_id,ScopedVector<ResourceThrottle> * throttles)21 void ResourceDispatcherHostDelegate::RequestBeginning(
22     net::URLRequest* request,
23     ResourceContext* resource_context,
24     appcache::AppCacheService* appcache_service,
25     ResourceType::Type resource_type,
26     int child_id,
27     int route_id,
28     ScopedVector<ResourceThrottle>* throttles) {
29 }
30 
WillTransferRequestToNewProcess(int old_child_id,int old_route_id,int old_request_id,int new_child_id,int new_route_id,int new_request_id)31 void ResourceDispatcherHostDelegate::WillTransferRequestToNewProcess(
32       int old_child_id,
33       int old_route_id,
34       int old_request_id,
35       int new_child_id,
36       int new_route_id,
37       int new_request_id) {
38 }
39 
DownloadStarting(net::URLRequest * request,ResourceContext * resource_context,int child_id,int route_id,int request_id,bool is_content_initiated,bool must_download,ScopedVector<ResourceThrottle> * throttles)40 void ResourceDispatcherHostDelegate::DownloadStarting(
41     net::URLRequest* request,
42     ResourceContext* resource_context,
43     int child_id,
44     int route_id,
45     int request_id,
46     bool is_content_initiated,
47     bool must_download,
48     ScopedVector<ResourceThrottle>* throttles) {
49 }
50 
AcceptSSLClientCertificateRequest(net::URLRequest * request,net::SSLCertRequestInfo * cert_request_info)51 bool ResourceDispatcherHostDelegate::AcceptSSLClientCertificateRequest(
52     net::URLRequest* request,
53     net::SSLCertRequestInfo* cert_request_info) {
54   return false;
55 }
56 
AcceptAuthRequest(net::URLRequest * request,net::AuthChallengeInfo * auth_info)57 bool ResourceDispatcherHostDelegate::AcceptAuthRequest(
58     net::URLRequest* request,
59     net::AuthChallengeInfo* auth_info) {
60   return false;
61 }
62 
63 ResourceDispatcherHostLoginDelegate*
CreateLoginDelegate(net::AuthChallengeInfo * auth_info,net::URLRequest * request)64     ResourceDispatcherHostDelegate::CreateLoginDelegate(
65         net::AuthChallengeInfo* auth_info,
66         net::URLRequest* request) {
67   return NULL;
68 }
69 
HandleExternalProtocol(const GURL & url,int child_id,int route_id)70 bool ResourceDispatcherHostDelegate::HandleExternalProtocol(const GURL& url,
71                                                             int child_id,
72                                                             int route_id) {
73   return true;
74 }
75 
ShouldForceDownloadResource(const GURL & url,const std::string & mime_type)76 bool ResourceDispatcherHostDelegate::ShouldForceDownloadResource(
77     const GURL& url,
78     const std::string& mime_type) {
79   return false;
80 }
81 
ShouldInterceptResourceAsStream(content::ResourceContext * resource_context,const GURL & url,const std::string & mime_type,GURL * origin,std::string * target_id)82 bool ResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream(
83     content::ResourceContext* resource_context,
84     const GURL& url,
85     const std::string& mime_type,
86     GURL* origin,
87     std::string* target_id) {
88   return false;
89 }
90 
OnStreamCreated(content::ResourceContext * resource_context,int render_process_id,int render_view_id,const std::string & target_id,scoped_ptr<StreamHandle> stream,int64 expected_content_size)91 void ResourceDispatcherHostDelegate::OnStreamCreated(
92     content::ResourceContext* resource_context,
93     int render_process_id,
94     int render_view_id,
95     const std::string& target_id,
96     scoped_ptr<StreamHandle> stream,
97     int64 expected_content_size) {
98 }
99 
OnResponseStarted(net::URLRequest * request,ResourceContext * resource_context,ResourceResponse * response,IPC::Sender * sender)100 void ResourceDispatcherHostDelegate::OnResponseStarted(
101     net::URLRequest* request,
102     ResourceContext* resource_context,
103     ResourceResponse* response,
104     IPC::Sender* sender) {
105 }
106 
OnRequestRedirected(const GURL & redirect_url,net::URLRequest * request,ResourceContext * resource_context,ResourceResponse * response)107 void ResourceDispatcherHostDelegate::OnRequestRedirected(
108     const GURL& redirect_url,
109     net::URLRequest* request,
110     ResourceContext* resource_context,
111     ResourceResponse* response) {
112 }
113 
ResourceDispatcherHostDelegate()114 ResourceDispatcherHostDelegate::ResourceDispatcherHostDelegate() {
115 }
116 
~ResourceDispatcherHostDelegate()117 ResourceDispatcherHostDelegate::~ResourceDispatcherHostDelegate() {
118 }
119 
120 }  // namespace content
121