resource_dispatcher_host_delegate.cc revision 90dce4d38c5ff5333bea97d859d4e484e27edf0c
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
9namespace content {
10
11bool 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    const Referrer& referrer) {
19  return true;
20}
21
22void ResourceDispatcherHostDelegate::RequestBeginning(
23    net::URLRequest* request,
24    ResourceContext* resource_context,
25    appcache::AppCacheService* appcache_service,
26    ResourceType::Type resource_type,
27    int child_id,
28    int route_id,
29    bool is_continuation_of_transferred_request,
30    ScopedVector<ResourceThrottle>* throttles) {
31}
32
33void ResourceDispatcherHostDelegate::DownloadStarting(
34    net::URLRequest* request,
35    ResourceContext* resource_context,
36    int child_id,
37    int route_id,
38    int request_id,
39    bool is_content_initiated,
40    bool must_download,
41    ScopedVector<ResourceThrottle>* throttles) {
42}
43
44bool ResourceDispatcherHostDelegate::AcceptSSLClientCertificateRequest(
45    net::URLRequest* request,
46    net::SSLCertRequestInfo* cert_request_info) {
47  return false;
48}
49
50bool ResourceDispatcherHostDelegate::AcceptAuthRequest(
51    net::URLRequest* request,
52    net::AuthChallengeInfo* auth_info) {
53  return false;
54}
55
56ResourceDispatcherHostLoginDelegate*
57    ResourceDispatcherHostDelegate::CreateLoginDelegate(
58        net::AuthChallengeInfo* auth_info,
59        net::URLRequest* request) {
60  return NULL;
61}
62
63bool ResourceDispatcherHostDelegate::HandleExternalProtocol(const GURL& url,
64                                                            int child_id,
65                                                            int route_id) {
66  return true;
67}
68
69bool ResourceDispatcherHostDelegate::ShouldForceDownloadResource(
70    const GURL& url,
71    const std::string& mime_type) {
72  return false;
73}
74
75bool ResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream(
76    content::ResourceContext* resource_context,
77    const GURL& url,
78    const std::string& mime_type,
79    GURL* security_origin,
80    std::string* target_id) {
81  return false;
82}
83
84void ResourceDispatcherHostDelegate::OnStreamCreated(
85    content::ResourceContext* resource_context,
86    int render_process_id,
87    int render_view_id,
88    const std::string& target_id,
89    scoped_ptr<StreamHandle> stream,
90    int64 expected_content_size) {
91}
92
93void ResourceDispatcherHostDelegate::OnResponseStarted(
94    net::URLRequest* request,
95    ResourceContext* resource_context,
96    ResourceResponse* response,
97    IPC::Sender* sender) {
98}
99
100void ResourceDispatcherHostDelegate::OnRequestRedirected(
101    const GURL& redirect_url,
102    net::URLRequest* request,
103    ResourceContext* resource_context,
104    ResourceResponse* response) {
105}
106
107ResourceDispatcherHostDelegate::ResourceDispatcherHostDelegate() {
108}
109
110ResourceDispatcherHostDelegate::~ResourceDispatcherHostDelegate() {
111}
112
113}  // namespace content
114