| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" | 5 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ssl/ssl_client_auth_handler.h" | 7 #include "chrome/browser/ssl/ssl_client_auth_handler.h" |
| 8 #include "chrome/browser/ui/login/login_prompt.h" | 8 #include "chrome/browser/ui/login/login_prompt.h" |
| 9 #include "content/browser/renderer_host/resource_handler.h" | 9 #include "content/browser/renderer_host/resource_handler.h" |
| 10 #include "webkit/blob/blob_data.h" | 10 #include "webkit/blob/blob_data.h" |
| 11 | 11 |
| 12 ResourceDispatcherHostRequestInfo::ResourceDispatcherHostRequestInfo( | 12 ResourceDispatcherHostRequestInfo::ResourceDispatcherHostRequestInfo( |
| 13 ResourceHandler* handler, | 13 ResourceHandler* handler, |
| 14 ChildProcessInfo::ProcessType process_type, | 14 ChildProcessInfo::ProcessType process_type, |
| 15 int child_id, | 15 int child_id, |
| 16 int route_id, | 16 int route_id, |
| 17 int request_id, | 17 int request_id, |
| 18 ResourceType::Type resource_type, | 18 ResourceType::Type resource_type, |
| 19 uint64 upload_size, | 19 uint64 upload_size, |
| 20 bool is_download, | 20 bool is_download, |
| 21 bool allow_download, | 21 bool allow_download, |
| 22 bool has_user_gesture) | 22 bool has_user_gesture, |
| 23 const content::ResourceContext* context) |
| 23 : resource_handler_(handler), | 24 : resource_handler_(handler), |
| 24 cross_site_handler_(NULL), | 25 cross_site_handler_(NULL), |
| 25 process_type_(process_type), | 26 process_type_(process_type), |
| 26 child_id_(child_id), | 27 child_id_(child_id), |
| 27 route_id_(route_id), | 28 route_id_(route_id), |
| 28 request_id_(request_id), | 29 request_id_(request_id), |
| 29 pending_data_count_(0), | 30 pending_data_count_(0), |
| 30 is_download_(is_download), | 31 is_download_(is_download), |
| 31 allow_download_(allow_download), | 32 allow_download_(allow_download), |
| 32 has_user_gesture_(has_user_gesture), | 33 has_user_gesture_(has_user_gesture), |
| 33 pause_count_(0), | 34 pause_count_(0), |
| 34 resource_type_(resource_type), | 35 resource_type_(resource_type), |
| 35 last_load_state_(net::LOAD_STATE_IDLE), | 36 last_load_state_(net::LOAD_STATE_IDLE), |
| 36 upload_size_(upload_size), | 37 upload_size_(upload_size), |
| 37 last_upload_position_(0), | 38 last_upload_position_(0), |
| 38 waiting_for_upload_progress_ack_(false), | 39 waiting_for_upload_progress_ack_(false), |
| 39 memory_cost_(0), | 40 memory_cost_(0), |
| 41 context_(context), |
| 40 is_paused_(false), | 42 is_paused_(false), |
| 41 called_on_response_started_(false), | 43 called_on_response_started_(false), |
| 42 has_started_reading_(false), | 44 has_started_reading_(false), |
| 43 paused_read_bytes_(0) { | 45 paused_read_bytes_(0) { |
| 44 } | 46 } |
| 45 | 47 |
| 46 ResourceDispatcherHostRequestInfo::~ResourceDispatcherHostRequestInfo() { | 48 ResourceDispatcherHostRequestInfo::~ResourceDispatcherHostRequestInfo() { |
| 47 resource_handler_->OnRequestClosed(); | 49 resource_handler_->OnRequestClosed(); |
| 48 } | 50 } |
| 49 | 51 |
| 50 void ResourceDispatcherHostRequestInfo::set_login_handler(LoginHandler* lh) { | 52 void ResourceDispatcherHostRequestInfo::set_login_handler(LoginHandler* lh) { |
| 51 login_handler_ = lh; | 53 login_handler_ = lh; |
| 52 } | 54 } |
| 53 | 55 |
| 54 void ResourceDispatcherHostRequestInfo::set_ssl_client_auth_handler( | 56 void ResourceDispatcherHostRequestInfo::set_ssl_client_auth_handler( |
| 55 SSLClientAuthHandler* s) { | 57 SSLClientAuthHandler* s) { |
| 56 ssl_client_auth_handler_ = s; | 58 ssl_client_auth_handler_ = s; |
| 57 } | 59 } |
| 58 | 60 |
| 59 void ResourceDispatcherHostRequestInfo::set_requested_blob_data( | 61 void ResourceDispatcherHostRequestInfo::set_requested_blob_data( |
| 60 webkit_blob::BlobData* data) { | 62 webkit_blob::BlobData* data) { |
| 61 requested_blob_data_ = data; | 63 requested_blob_data_ = data; |
| 62 } | 64 } |
| OLD | NEW |