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

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: Added tests for the navigation request ID 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 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 return true; 1591 return true;
1592 } 1592 }
1593 1593
1594 void ResourceDispatcherHostImpl::FinishedWithResourcesForRequest( 1594 void ResourceDispatcherHostImpl::FinishedWithResourcesForRequest(
1595 const net::URLRequest* request_) { 1595 const net::URLRequest* request_) {
1596 const ResourceRequestInfoImpl* info = 1596 const ResourceRequestInfoImpl* info =
1597 ResourceRequestInfoImpl::ForRequest(request_); 1597 ResourceRequestInfoImpl::ForRequest(request_);
1598 IncrementOutstandingRequestsCount(-1, *info); 1598 IncrementOutstandingRequestsCount(-1, *info);
1599 } 1599 }
1600 1600
1601 void ResourceDispatcherHostImpl::NavigationRequest( 1601 void ResourceDispatcherHostImpl::StartNavigationRequest(
1602 const NavigationRequestInfo& info, 1602 const NavigationRequestInfo& info,
1603 scoped_refptr<ResourceRequestBody> request_body, 1603 scoped_refptr<ResourceRequestBody> request_body,
1604 int64 navigation_request_id,
1604 int64 frame_node_id) { 1605 int64 frame_node_id) {
1605 NOTIMPLEMENTED(); 1606 NOTIMPLEMENTED();
1606 } 1607 }
1608
1609 void ResourceDispatcherHostImpl::CancelNavigationRequest(
1610 int64 navigation_request_id,
1611 int64 frame_node_id) {
1612 NOTIMPLEMENTED();
1613 }
1607 1614
1608 // static 1615 // static
1609 int ResourceDispatcherHostImpl::CalculateApproximateMemoryCost( 1616 int ResourceDispatcherHostImpl::CalculateApproximateMemoryCost(
1610 net::URLRequest* request) { 1617 net::URLRequest* request) {
1611 // The following fields should be a minor size contribution (experimentally 1618 // The following fields should be a minor size contribution (experimentally
1612 // on the order of 100). However since they are variable length, it could 1619 // on the order of 100). However since they are variable length, it could
1613 // in theory be a sizeable contribution. 1620 // in theory be a sizeable contribution.
1614 int strings_cost = request->extra_request_headers().ToString().size() + 1621 int strings_cost = request->extra_request_headers().ToString().size() +
1615 request->original_url().spec().size() + 1622 request->original_url().spec().size() +
1616 request->referrer().size() + 1623 request->referrer().size() +
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 1986
1980 // Add a flag to selectively bypass the data reduction proxy if the resource 1987 // Add a flag to selectively bypass the data reduction proxy if the resource
1981 // type is not an image. 1988 // type is not an image.
1982 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 1989 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
1983 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 1990 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
1984 1991
1985 return load_flags; 1992 return load_flags;
1986 } 1993 }
1987 1994
1988 } // namespace content 1995 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698