OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
8 | 8 |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
(...skipping 1863 matching lines...) Loading... |
1874 SetReferrerForRequest(request.get(), referrer); | 1874 SetReferrerForRequest(request.get(), referrer); |
1875 | 1875 |
1876 // So far, for saving page, we need fetch content from cache, in the | 1876 // So far, for saving page, we need fetch content from cache, in the |
1877 // future, maybe we can use a configuration to configure this behavior. | 1877 // future, maybe we can use a configuration to configure this behavior. |
1878 request->SetLoadFlags(net::LOAD_PREFERRING_CACHE); | 1878 request->SetLoadFlags(net::LOAD_PREFERRING_CACHE); |
1879 | 1879 |
1880 // Since we're just saving some resources we need, disallow downloading. | 1880 // Since we're just saving some resources we need, disallow downloading. |
1881 ResourceRequestInfoImpl* extra_info = | 1881 ResourceRequestInfoImpl* extra_info = |
1882 CreateRequestInfo(child_id, render_view_route_id, | 1882 CreateRequestInfo(child_id, render_view_route_id, |
1883 render_frame_route_id, false, context); | 1883 render_frame_route_id, false, context); |
| 1884 extra_info->set_do_not_prompt_for_login(true); |
1884 extra_info->AssociateWithRequest(request.get()); // Request takes ownership. | 1885 extra_info->AssociateWithRequest(request.get()); // Request takes ownership. |
1885 | 1886 |
1886 std::unique_ptr<ResourceHandler> handler(new SaveFileResourceHandler( | 1887 std::unique_ptr<ResourceHandler> handler(new SaveFileResourceHandler( |
1887 request.get(), save_item_id, save_package_id, child_id, | 1888 request.get(), save_item_id, save_package_id, child_id, |
1888 render_frame_route_id, url, save_file_manager_.get())); | 1889 render_frame_route_id, url, save_file_manager_.get())); |
1889 | 1890 |
1890 BeginRequestInternal(std::move(request), std::move(handler)); | 1891 BeginRequestInternal(std::move(request), std::move(handler)); |
1891 } | 1892 } |
1892 | 1893 |
1893 void ResourceDispatcherHostImpl::MarkAsTransferredNavigation( | 1894 void ResourceDispatcherHostImpl::MarkAsTransferredNavigation( |
(...skipping 702 matching lines...) Loading... |
2596 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); | 2597 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); |
2597 response->head.security_info = SerializeSecurityInfo(ssl); | 2598 response->head.security_info = SerializeSecurityInfo(ssl); |
2598 } | 2599 } |
2599 | 2600 |
2600 CertStore* ResourceDispatcherHostImpl::GetCertStore() { | 2601 CertStore* ResourceDispatcherHostImpl::GetCertStore() { |
2601 return cert_store_for_testing_ ? cert_store_for_testing_ | 2602 return cert_store_for_testing_ ? cert_store_for_testing_ |
2602 : CertStore::GetInstance(); | 2603 : CertStore::GetInstance(); |
2603 } | 2604 } |
2604 | 2605 |
2605 } // namespace content | 2606 } // namespace content |
OLD | NEW |