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 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1603 return true; | 1603 return true; |
1604 } | 1604 } |
1605 | 1605 |
1606 void ResourceDispatcherHostImpl::FinishedWithResourcesForRequest( | 1606 void ResourceDispatcherHostImpl::FinishedWithResourcesForRequest( |
1607 const net::URLRequest* request_) { | 1607 const net::URLRequest* request_) { |
1608 const ResourceRequestInfoImpl* info = | 1608 const ResourceRequestInfoImpl* info = |
1609 ResourceRequestInfoImpl::ForRequest(request_); | 1609 ResourceRequestInfoImpl::ForRequest(request_); |
1610 IncrementOutstandingRequestsCount(-1, *info); | 1610 IncrementOutstandingRequestsCount(-1, *info); |
1611 } | 1611 } |
1612 | 1612 |
1613 void ResourceDispatcherHostImpl::NavigationRequest( | 1613 void ResourceDispatcherHostImpl::StartNavigationRequest( |
1614 const NavigationRequestInfo& info, | 1614 const NavigationRequestInfo& info, |
1615 scoped_refptr<ResourceRequestBody> request_body, | 1615 scoped_refptr<ResourceRequestBody> request_body, |
| 1616 int64 navigation_request_id, |
1616 int64 frame_node_id) { | 1617 int64 frame_node_id) { |
1617 NOTIMPLEMENTED(); | 1618 NOTIMPLEMENTED(); |
1618 } | 1619 } |
| 1620 |
| 1621 void ResourceDispatcherHostImpl::CancelNavigationRequest( |
| 1622 int64 navigation_request_id, |
| 1623 int64 frame_node_id) { |
| 1624 NOTIMPLEMENTED(); |
| 1625 } |
1619 | 1626 |
1620 // static | 1627 // static |
1621 int ResourceDispatcherHostImpl::CalculateApproximateMemoryCost( | 1628 int ResourceDispatcherHostImpl::CalculateApproximateMemoryCost( |
1622 net::URLRequest* request) { | 1629 net::URLRequest* request) { |
1623 // The following fields should be a minor size contribution (experimentally | 1630 // The following fields should be a minor size contribution (experimentally |
1624 // on the order of 100). However since they are variable length, it could | 1631 // on the order of 100). However since they are variable length, it could |
1625 // in theory be a sizeable contribution. | 1632 // in theory be a sizeable contribution. |
1626 int strings_cost = request->extra_request_headers().ToString().size() + | 1633 int strings_cost = request->extra_request_headers().ToString().size() + |
1627 request->original_url().spec().size() + | 1634 request->original_url().spec().size() + |
1628 request->referrer().size() + | 1635 request->referrer().size() + |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1991 | 1998 |
1992 // Add a flag to selectively bypass the data reduction proxy if the resource | 1999 // Add a flag to selectively bypass the data reduction proxy if the resource |
1993 // type is not an image. | 2000 // type is not an image. |
1994 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) | 2001 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) |
1995 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; | 2002 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; |
1996 | 2003 |
1997 return load_flags; | 2004 return load_flags; |
1998 } | 2005 } |
1999 | 2006 |
2000 } // namespace content | 2007 } // namespace content |
OLD | NEW |