Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(810)

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host_impl.cc

Issue 10700170: Fix transferring processes during a redirect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/renderer_host/resource_dispatcher_host_impl.h" 7 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h"
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 } 927 }
928 928
929 int load_flags = 929 int load_flags =
930 BuildLoadFlagsForRequest(request_data, child_id, sync_result != NULL); 930 BuildLoadFlagsForRequest(request_data, child_id, sync_result != NULL);
931 931
932 // Construct the request. 932 // Construct the request.
933 scoped_ptr<net::URLRequest> new_request; 933 scoped_ptr<net::URLRequest> new_request;
934 net::URLRequest* request; 934 net::URLRequest* request;
935 if (deferred_loader.get()) { 935 if (deferred_loader.get()) {
936 request = deferred_loader->request(); 936 request = deferred_loader->request();
937
938 // Give the ResourceLoader (or any of the ResourceHandlers held by it) a
939 // chance to reset some state before we complete the transfer.
940 deferred_loader->WillCompleteTransfer();
937 } else { 941 } else {
938 new_request.reset(new net::URLRequest( 942 new_request.reset(new net::URLRequest(
939 request_data.url, 943 request_data.url,
940 NULL, 944 NULL,
941 filter_->GetURLRequestContext(request_data.resource_type))); 945 filter_->GetURLRequestContext(request_data.resource_type)));
942 request = new_request.get(); 946 request = new_request.get();
943 947
944 request->set_method(request_data.method); 948 request->set_method(request_data.method);
945 request->set_first_party_for_cookies(request_data.first_party_for_cookies); 949 request->set_first_party_for_cookies(request_data.first_party_for_cookies);
946 request->set_referrer(referrer.url.spec()); 950 request->set_referrer(referrer.url.spec());
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 1721
1718 return i->second.get(); 1722 return i->second.get();
1719 } 1723 }
1720 1724
1721 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, 1725 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id,
1722 int request_id) const { 1726 int request_id) const {
1723 return GetLoader(GlobalRequestID(child_id, request_id)); 1727 return GetLoader(GlobalRequestID(child_id, request_id));
1724 } 1728 }
1725 1729
1726 } // namespace content 1730 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698