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

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 failed test Created 6 years, 3 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
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.h ('k') | content/content_browser.gypi » ('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/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 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1650 return true; 1650 return true;
1651 } 1651 }
1652 1652
1653 void ResourceDispatcherHostImpl::FinishedWithResourcesForRequest( 1653 void ResourceDispatcherHostImpl::FinishedWithResourcesForRequest(
1654 const net::URLRequest* request_) { 1654 const net::URLRequest* request_) {
1655 const ResourceRequestInfoImpl* info = 1655 const ResourceRequestInfoImpl* info =
1656 ResourceRequestInfoImpl::ForRequest(request_); 1656 ResourceRequestInfoImpl::ForRequest(request_);
1657 IncrementOutstandingRequestsCount(-1, *info); 1657 IncrementOutstandingRequestsCount(-1, *info);
1658 } 1658 }
1659 1659
1660 void ResourceDispatcherHostImpl::NavigationRequest( 1660 void ResourceDispatcherHostImpl::StartNavigationRequest(
1661 const NavigationRequestInfo& info, 1661 const NavigationRequestInfo& info,
1662 scoped_refptr<ResourceRequestBody> request_body, 1662 scoped_refptr<ResourceRequestBody> request_body,
1663 int64 navigation_request_id,
1663 int64 frame_node_id) { 1664 int64 frame_node_id) {
1664 NOTIMPLEMENTED(); 1665 NOTIMPLEMENTED();
1665 } 1666 }
1667
1668 void ResourceDispatcherHostImpl::CancelNavigationRequest(
1669 int64 navigation_request_id,
1670 int64 frame_node_id) {
1671 NOTIMPLEMENTED();
1672 }
1666 1673
1667 // static 1674 // static
1668 int ResourceDispatcherHostImpl::CalculateApproximateMemoryCost( 1675 int ResourceDispatcherHostImpl::CalculateApproximateMemoryCost(
1669 net::URLRequest* request) { 1676 net::URLRequest* request) {
1670 // The following fields should be a minor size contribution (experimentally 1677 // The following fields should be a minor size contribution (experimentally
1671 // on the order of 100). However since they are variable length, it could 1678 // on the order of 100). However since they are variable length, it could
1672 // in theory be a sizeable contribution. 1679 // in theory be a sizeable contribution.
1673 int strings_cost = request->extra_request_headers().ToString().size() + 1680 int strings_cost = request->extra_request_headers().ToString().size() +
1674 request->original_url().spec().size() + 1681 request->original_url().spec().size() +
1675 request->referrer().size() + 1682 request->referrer().size() +
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
2038 2045
2039 // Add a flag to selectively bypass the data reduction proxy if the resource 2046 // Add a flag to selectively bypass the data reduction proxy if the resource
2040 // type is not an image. 2047 // type is not an image.
2041 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 2048 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
2042 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2049 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2043 2050
2044 return load_flags; 2051 return load_flags;
2045 } 2052 }
2046 2053
2047 } // namespace content 2054 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698