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) {
21 void ResourceDispatcherHostDelegate::RequestBeginning(
22 net::URLRequest* request,
23 ResourceContext* resource_context,
24 appcache::AppCacheService* appcache_service,
25 ResourceType::Type 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(
53 bool initiated_by_user_gesture) {
57 bool ResourceDispatcherHostDelegate::ShouldForceDownloadResource(
59 const std::string& mime_type) {
63 bool ResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream(
64 net::URLRequest* request,
65 const std::string& mime_type,
67 std::string* payload) {
71 void ResourceDispatcherHostDelegate::OnStreamCreated(
72 net::URLRequest* request,
73 scoped_ptr<content::StreamHandle> stream) {
76 void ResourceDispatcherHostDelegate::OnResponseStarted(
77 net::URLRequest* request,
78 ResourceContext* resource_context,
79 ResourceResponse* response,
80 IPC::Sender* sender) {
83 void ResourceDispatcherHostDelegate::OnRequestRedirected(
84 const GURL& redirect_url,
85 net::URLRequest* request,
86 ResourceContext* resource_context,
87 ResourceResponse* response) {
90 void ResourceDispatcherHostDelegate::RequestComplete(
91 net::URLRequest* url_request) {
94 ResourceDispatcherHostDelegate::ResourceDispatcherHostDelegate() {
97 ResourceDispatcherHostDelegate::~ResourceDispatcherHostDelegate() {
100 } // namespace content