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

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

Issue 143183009: When cross-site navigations are cancelled, delete the request being transferred (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: *Really* remove AbortTransfer Created 6 years, 10 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
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/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 extra_info->AssociateWithRequest(request.get()); // Request takes ownership. 1373 extra_info->AssociateWithRequest(request.get()); // Request takes ownership.
1374 1374
1375 BeginRequestInternal(request.Pass(), handler.Pass()); 1375 BeginRequestInternal(request.Pass(), handler.Pass());
1376 } 1376 }
1377 1377
1378 void ResourceDispatcherHostImpl::MarkAsTransferredNavigation( 1378 void ResourceDispatcherHostImpl::MarkAsTransferredNavigation(
1379 const GlobalRequestID& id) { 1379 const GlobalRequestID& id) {
1380 GetLoader(id)->MarkAsTransferring(); 1380 GetLoader(id)->MarkAsTransferring();
1381 } 1381 }
1382 1382
1383 void ResourceDispatcherHostImpl::CancelTransferringNavigation(
1384 const GlobalRequestID& id) {
1385 // Request should still exist and be in the middle of a transfer.
1386 DCHECK(IsTransferredNavigation(id));
1387 RemovePendingRequest(id.child_id, id.request_id);
1388 }
1389
1383 void ResourceDispatcherHostImpl::ResumeDeferredNavigation( 1390 void ResourceDispatcherHostImpl::ResumeDeferredNavigation(
1384 const GlobalRequestID& id) { 1391 const GlobalRequestID& id) {
1385 ResourceLoader* loader = GetLoader(id); 1392 ResourceLoader* loader = GetLoader(id);
1386 if (loader) { 1393 if (loader) {
1387 // The response we were meant to resume could have already been canceled. 1394 // The response we were meant to resume could have already been canceled.
1388 ResourceRequestInfoImpl* info = loader->GetRequestInfo(); 1395 ResourceRequestInfoImpl* info = loader->GetRequestInfo();
1389 if (info->cross_site_handler()) 1396 if (info->cross_site_handler())
1390 info->cross_site_handler()->ResumeResponse(); 1397 info->cross_site_handler()->ResumeResponse();
1391 } 1398 }
1392 } 1399 }
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1983 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) 1990 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS)
1984 && !policy->CanReadRawCookies(child_id)) { 1991 && !policy->CanReadRawCookies(child_id)) {
1985 VLOG(1) << "Denied unauthorized request for raw headers"; 1992 VLOG(1) << "Denied unauthorized request for raw headers";
1986 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; 1993 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS;
1987 } 1994 }
1988 1995
1989 return load_flags; 1996 return load_flags;
1990 } 1997 }
1991 1998
1992 } // namespace content 1999 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.h ('k') | content/browser/loader/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698