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