OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
6 | 6 |
7 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 7 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 child_id, | 486 child_id, |
487 route_id, | 487 route_id, |
488 this); | 488 this); |
489 } | 489 } |
490 | 490 |
491 // Insert a buffered event handler before the actual one. | 491 // Insert a buffered event handler before the actual one. |
492 handler = new BufferedResourceHandler(handler, this, request); | 492 handler = new BufferedResourceHandler(handler, this, request); |
493 | 493 |
494 if (delegate_) { | 494 if (delegate_) { |
495 bool sub = request_data.resource_type != ResourceType::MAIN_FRAME; | 495 bool sub = request_data.resource_type != ResourceType::MAIN_FRAME; |
496 handler = delegate_->RequestBeginning( | 496 handler = delegate_->RequestBeginning(handler, request, resource_context, |
497 handler, request, sub, child_id, route_id); | 497 sub, child_id, route_id); |
498 } | 498 } |
499 | 499 |
500 // Make extra info and read footer (contains request ID). | 500 // Make extra info and read footer (contains request ID). |
501 ResourceDispatcherHostRequestInfo* extra_info = | 501 ResourceDispatcherHostRequestInfo* extra_info = |
502 new ResourceDispatcherHostRequestInfo( | 502 new ResourceDispatcherHostRequestInfo( |
503 handler, | 503 handler, |
504 process_type, | 504 process_type, |
505 child_id, | 505 child_id, |
506 route_id, | 506 route_id, |
507 request_data.origin_pid, | 507 request_data.origin_pid, |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 new DownloadResourceHandler(this, | 703 new DownloadResourceHandler(this, |
704 child_id, | 704 child_id, |
705 route_id, | 705 route_id, |
706 request_id_, | 706 request_id_, |
707 url, | 707 url, |
708 download_file_manager_.get(), | 708 download_file_manager_.get(), |
709 request, | 709 request, |
710 prompt_for_save_location, | 710 prompt_for_save_location, |
711 save_info)); | 711 save_info)); |
712 | 712 |
713 if (delegate_) | 713 if (delegate_) { |
714 handler = delegate_->DownloadStarting(handler, child_id, route_id); | 714 handler = delegate_->DownloadStarting(handler, context, child_id, |
| 715 route_id); |
| 716 } |
715 | 717 |
716 const net::URLRequestContext* request_context = context.request_context(); | 718 const net::URLRequestContext* request_context = context.request_context(); |
717 | 719 |
718 if (!request_context->job_factory()->IsHandledURL(url)) { | 720 if (!request_context->job_factory()->IsHandledURL(url)) { |
719 VLOG(1) << "Download request for unsupported protocol: " | 721 VLOG(1) << "Download request for unsupported protocol: " |
720 << url.possibly_invalid_spec(); | 722 << url.possibly_invalid_spec(); |
721 return; | 723 return; |
722 } | 724 } |
723 | 725 |
724 request->set_method("GET"); | 726 request->set_method("GET"); |
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2004 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; | 2006 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; |
2005 } | 2007 } |
2006 | 2008 |
2007 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { | 2009 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { |
2008 return allow_cross_origin_auth_prompt_; | 2010 return allow_cross_origin_auth_prompt_; |
2009 } | 2011 } |
2010 | 2012 |
2011 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { | 2013 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { |
2012 allow_cross_origin_auth_prompt_ = value; | 2014 allow_cross_origin_auth_prompt_ = value; |
2013 } | 2015 } |
OLD | NEW |