| 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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 | 735 |
| 736 BeginRequestInternal(request); | 736 BeginRequestInternal(request); |
| 737 } | 737 } |
| 738 | 738 |
| 739 // This function is only used for saving feature. | 739 // This function is only used for saving feature. |
| 740 void ResourceDispatcherHost::BeginSaveFile( | 740 void ResourceDispatcherHost::BeginSaveFile( |
| 741 const GURL& url, | 741 const GURL& url, |
| 742 const GURL& referrer, | 742 const GURL& referrer, |
| 743 int child_id, | 743 int child_id, |
| 744 int route_id, | 744 int route_id, |
| 745 const FilePath& default_download_dir, |
| 745 const content::ResourceContext& context) { | 746 const content::ResourceContext& context) { |
| 746 if (is_shutdown_) | 747 if (is_shutdown_) |
| 747 return; | 748 return; |
| 748 | 749 |
| 749 scoped_refptr<ResourceHandler> handler( | 750 scoped_refptr<ResourceHandler> handler( |
| 750 new SaveFileResourceHandler(child_id, | 751 new SaveFileResourceHandler(child_id, |
| 751 route_id, | 752 route_id, |
| 752 url, | 753 url, |
| 754 default_download_dir, |
| 753 save_file_manager_.get())); | 755 save_file_manager_.get())); |
| 754 request_id_--; | 756 request_id_--; |
| 755 | 757 |
| 756 const net::URLRequestContext* request_context = context.request_context(); | 758 const net::URLRequestContext* request_context = context.request_context(); |
| 757 bool known_proto = | 759 bool known_proto = |
| 758 request_context->job_factory()->IsHandledURL(url); | 760 request_context->job_factory()->IsHandledURL(url); |
| 759 if (!known_proto) { | 761 if (!known_proto) { |
| 760 // Since any URLs which have non-standard scheme have been filtered | 762 // Since any URLs which have non-standard scheme have been filtered |
| 761 // by save manager(see GURL::SchemeIsStandard). This situation | 763 // by save manager(see GURL::SchemeIsStandard). This situation |
| 762 // should not happen. | 764 // should not happen. |
| (...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2005 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; | 2007 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; |
| 2006 } | 2008 } |
| 2007 | 2009 |
| 2008 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { | 2010 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { |
| 2009 return allow_cross_origin_auth_prompt_; | 2011 return allow_cross_origin_auth_prompt_; |
| 2010 } | 2012 } |
| 2011 | 2013 |
| 2012 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { | 2014 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { |
| 2013 allow_cross_origin_auth_prompt_ = value; | 2015 allow_cross_origin_auth_prompt_ = value; |
| 2014 } | 2016 } |
| OLD | NEW |