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 resource_type,
17 ResourceContext* resource_context) {
21 void ResourceDispatcherHostDelegate::RequestBeginning(
22 net::URLRequest* request,
23 ResourceContext* resource_context,
24 AppCacheService* appcache_service,
25 ResourceType resource_type,
28 ScopedVector<ResourceThrottle>* throttles) {
31 void ResourceDispatcherHostDelegate::DownloadStarting(
32 net::URLRequest* request,
33 ResourceContext* resource_context,
37 bool is_content_initiated,
39 ScopedVector<ResourceThrottle>* throttles) {
42 ResourceDispatcherHostLoginDelegate*
43 ResourceDispatcherHostDelegate::CreateLoginDelegate(
44 net::AuthChallengeInfo* auth_info,
45 net::URLRequest* request) {
49 bool ResourceDispatcherHostDelegate::HandleExternalProtocol(const GURL& url,
55 bool ResourceDispatcherHostDelegate::ShouldForceDownloadResource(
57 const std::string& mime_type) {
61 bool ResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream(
62 net::URLRequest* request,
63 const std::string& mime_type,
65 std::string* payload) {
69 void ResourceDispatcherHostDelegate::OnStreamCreated(
70 net::URLRequest* request,
71 scoped_ptr<content::StreamHandle> stream) {
74 void ResourceDispatcherHostDelegate::OnResponseStarted(
75 net::URLRequest* request,
76 ResourceContext* resource_context,
77 ResourceResponse* response,
78 IPC::Sender* sender) {
81 void ResourceDispatcherHostDelegate::OnRequestRedirected(
82 const GURL& redirect_url,
83 net::URLRequest* request,
84 ResourceContext* resource_context,
85 ResourceResponse* response) {
88 void ResourceDispatcherHostDelegate::RequestComplete(
89 net::URLRequest* url_request) {
92 ResourceDispatcherHostDelegate::ResourceDispatcherHostDelegate() {
95 ResourceDispatcherHostDelegate::~ResourceDispatcherHostDelegate() {
98 } // namespace content