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

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

Issue 475783002: PlzNavigate: add cancel navigation logic for uncommitted requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the linking issue. Created 6 years, 4 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
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 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1607 return true; 1607 return true;
1608 } 1608 }
1609 1609
1610 void ResourceDispatcherHostImpl::FinishedWithResourcesForRequest( 1610 void ResourceDispatcherHostImpl::FinishedWithResourcesForRequest(
1611 const net::URLRequest* request_) { 1611 const net::URLRequest* request_) {
1612 const ResourceRequestInfoImpl* info = 1612 const ResourceRequestInfoImpl* info =
1613 ResourceRequestInfoImpl::ForRequest(request_); 1613 ResourceRequestInfoImpl::ForRequest(request_);
1614 IncrementOutstandingRequestsCount(-1, *info); 1614 IncrementOutstandingRequestsCount(-1, *info);
1615 } 1615 }
1616 1616
1617 void ResourceDispatcherHostImpl::NavigationRequest( 1617 void ResourceDispatcherHostImpl::StartNavigationRequest(
1618 const NavigationRequestInfo& info, 1618 const NavigationRequestInfo& info,
1619 scoped_refptr<ResourceRequestBody> request_body, 1619 scoped_refptr<ResourceRequestBody> request_body,
1620 int64 navigation_request_id,
1620 int64 frame_node_id) { 1621 int64 frame_node_id) {
1621 NOTIMPLEMENTED(); 1622 NOTIMPLEMENTED();
1622 } 1623 }
1624
1625 void ResourceDispatcherHostImpl::CancelNavigationRequest(
1626 int64 navigation_request_id,
1627 int64 frame_node_id) {
1628 NOTIMPLEMENTED();
1629 }
1623 1630
1624 // static 1631 // static
1625 int ResourceDispatcherHostImpl::CalculateApproximateMemoryCost( 1632 int ResourceDispatcherHostImpl::CalculateApproximateMemoryCost(
1626 net::URLRequest* request) { 1633 net::URLRequest* request) {
1627 // The following fields should be a minor size contribution (experimentally 1634 // The following fields should be a minor size contribution (experimentally
1628 // on the order of 100). However since they are variable length, it could 1635 // on the order of 100). However since they are variable length, it could
1629 // in theory be a sizeable contribution. 1636 // in theory be a sizeable contribution.
1630 int strings_cost = request->extra_request_headers().ToString().size() + 1637 int strings_cost = request->extra_request_headers().ToString().size() +
1631 request->original_url().spec().size() + 1638 request->original_url().spec().size() +
1632 request->referrer().size() + 1639 request->referrer().size() +
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1995 2002
1996 // Add a flag to selectively bypass the data reduction proxy if the resource 2003 // Add a flag to selectively bypass the data reduction proxy if the resource
1997 // type is not an image. 2004 // type is not an image.
1998 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 2005 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
1999 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2006 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2000 2007
2001 return load_flags; 2008 return load_flags;
2002 } 2009 }
2003 2010
2004 } // namespace content 2011 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698