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(const std::string & method,const GURL & url,ResourceType resource_type,ResourceContext * resource_context)11 bool ResourceDispatcherHostDelegate::ShouldBeginRequest(
12 const std::string& method,
13 const GURL& url,
14 ResourceType resource_type,
15 ResourceContext* resource_context) {
16 return true;
17 }
18
RequestBeginning(net::URLRequest * request,ResourceContext * resource_context,AppCacheService * appcache_service,ResourceType resource_type,ScopedVector<ResourceThrottle> * throttles)19 void ResourceDispatcherHostDelegate::RequestBeginning(
20 net::URLRequest* request,
21 ResourceContext* resource_context,
22 AppCacheService* appcache_service,
23 ResourceType resource_type,
24 ScopedVector<ResourceThrottle>* throttles) {
25 }
26
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)27 void ResourceDispatcherHostDelegate::DownloadStarting(
28 net::URLRequest* request,
29 ResourceContext* resource_context,
30 int child_id,
31 int route_id,
32 int request_id,
33 bool is_content_initiated,
34 bool must_download,
35 ScopedVector<ResourceThrottle>* throttles) {
36 }
37
38 ResourceDispatcherHostLoginDelegate*
CreateLoginDelegate(net::AuthChallengeInfo * auth_info,net::URLRequest * request)39 ResourceDispatcherHostDelegate::CreateLoginDelegate(
40 net::AuthChallengeInfo* auth_info,
41 net::URLRequest* request) {
42 return NULL;
43 }
44
HandleExternalProtocol(const GURL & url,int child_id,int route_id)45 bool ResourceDispatcherHostDelegate::HandleExternalProtocol(const GURL& url,
46 int child_id,
47 int route_id) {
48 return true;
49 }
50
ShouldForceDownloadResource(const GURL & url,const std::string & mime_type)51 bool ResourceDispatcherHostDelegate::ShouldForceDownloadResource(
52 const GURL& url,
53 const std::string& mime_type) {
54 return false;
55 }
56
ShouldInterceptResourceAsStream(net::URLRequest * request,const std::string & mime_type,GURL * origin,std::string * payload)57 bool ResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream(
58 net::URLRequest* request,
59 const std::string& mime_type,
60 GURL* origin,
61 std::string* payload) {
62 return false;
63 }
64
OnStreamCreated(net::URLRequest * request,scoped_ptr<content::StreamHandle> stream)65 void ResourceDispatcherHostDelegate::OnStreamCreated(
66 net::URLRequest* request,
67 scoped_ptr<content::StreamHandle> stream) {
68 }
69
OnResponseStarted(net::URLRequest * request,ResourceContext * resource_context,ResourceResponse * response,IPC::Sender * sender)70 void ResourceDispatcherHostDelegate::OnResponseStarted(
71 net::URLRequest* request,
72 ResourceContext* resource_context,
73 ResourceResponse* response,
74 IPC::Sender* sender) {
75 }
76
OnRequestRedirected(const GURL & redirect_url,net::URLRequest * request,ResourceContext * resource_context,ResourceResponse * response)77 void ResourceDispatcherHostDelegate::OnRequestRedirected(
78 const GURL& redirect_url,
79 net::URLRequest* request,
80 ResourceContext* resource_context,
81 ResourceResponse* response) {
82 }
83
RequestComplete(net::URLRequest * url_request)84 void ResourceDispatcherHostDelegate::RequestComplete(
85 net::URLRequest* url_request) {
86 }
87
ResourceDispatcherHostDelegate()88 ResourceDispatcherHostDelegate::ResourceDispatcherHostDelegate() {
89 }
90
~ResourceDispatcherHostDelegate()91 ResourceDispatcherHostDelegate::~ResourceDispatcherHostDelegate() {
92 }
93
94 } // namespace content
95