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