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(const GURL& url,
55 bool ResourceDispatcherHostDelegate::ShouldForceDownloadResource(
57 const std::string& mime_type) {
61 bool ResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream(
62 content::ResourceContext* resource_context,
64 const std::string& mime_type,
66 std::string* target_id) {
70 void ResourceDispatcherHostDelegate::OnStreamCreated(
71 content::ResourceContext* resource_context,
72 int render_process_id,
74 const std::string& target_id,
75 scoped_ptr<StreamHandle> stream,
76 int64 expected_content_size) {
79 void ResourceDispatcherHostDelegate::OnResponseStarted(
80 net::URLRequest* request,
81 ResourceContext* resource_context,
82 ResourceResponse* response,
83 IPC::Sender* sender) {
86 void ResourceDispatcherHostDelegate::OnRequestRedirected(
87 const GURL& redirect_url,
88 net::URLRequest* request,
89 ResourceContext* resource_context,
90 ResourceResponse* response) {
93 void ResourceDispatcherHostDelegate::RequestComplete(
94 net::URLRequest* url_request) {
97 ResourceDispatcherHostDelegate::ResourceDispatcherHostDelegate() {
100 ResourceDispatcherHostDelegate::~ResourceDispatcherHostDelegate() {
103 } // namespace content