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 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1616 return true; | 1616 return true; |
1617 } | 1617 } |
1618 | 1618 |
1619 void ResourceDispatcherHostImpl::FinishedWithResourcesForRequest( | 1619 void ResourceDispatcherHostImpl::FinishedWithResourcesForRequest( |
1620 const net::URLRequest* request_) { | 1620 const net::URLRequest* request_) { |
1621 const ResourceRequestInfoImpl* info = | 1621 const ResourceRequestInfoImpl* info = |
1622 ResourceRequestInfoImpl::ForRequest(request_); | 1622 ResourceRequestInfoImpl::ForRequest(request_); |
1623 IncrementOutstandingRequestsCount(-1, *info); | 1623 IncrementOutstandingRequestsCount(-1, *info); |
1624 } | 1624 } |
1625 | 1625 |
1626 void ResourceDispatcherHostImpl::NavigationRequest( | 1626 void ResourceDispatcherHostImpl::StartNavigationRequest( |
1627 const NavigationRequestInfo& info, | 1627 const NavigationRequestInfo& info, |
1628 scoped_refptr<ResourceRequestBody> request_body, | 1628 scoped_refptr<ResourceRequestBody> request_body, |
| 1629 int64 navigation_request_id, |
1629 int64 frame_node_id) { | 1630 int64 frame_node_id) { |
1630 NOTIMPLEMENTED(); | 1631 NOTIMPLEMENTED(); |
1631 } | 1632 } |
| 1633 |
| 1634 void ResourceDispatcherHostImpl::CancelNavigationRequest( |
| 1635 int64 navigation_request_id, |
| 1636 int64 frame_node_id) { |
| 1637 NOTIMPLEMENTED(); |
| 1638 } |
1632 | 1639 |
1633 // static | 1640 // static |
1634 int ResourceDispatcherHostImpl::CalculateApproximateMemoryCost( | 1641 int ResourceDispatcherHostImpl::CalculateApproximateMemoryCost( |
1635 net::URLRequest* request) { | 1642 net::URLRequest* request) { |
1636 // The following fields should be a minor size contribution (experimentally | 1643 // The following fields should be a minor size contribution (experimentally |
1637 // on the order of 100). However since they are variable length, it could | 1644 // on the order of 100). However since they are variable length, it could |
1638 // in theory be a sizeable contribution. | 1645 // in theory be a sizeable contribution. |
1639 int strings_cost = request->extra_request_headers().ToString().size() + | 1646 int strings_cost = request->extra_request_headers().ToString().size() + |
1640 request->original_url().spec().size() + | 1647 request->original_url().spec().size() + |
1641 request->referrer().size() + | 1648 request->referrer().size() + |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2004 | 2011 |
2005 // Add a flag to selectively bypass the data reduction proxy if the resource | 2012 // Add a flag to selectively bypass the data reduction proxy if the resource |
2006 // type is not an image. | 2013 // type is not an image. |
2007 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) | 2014 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) |
2008 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; | 2015 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; |
2009 | 2016 |
2010 return load_flags; | 2017 return load_flags; |
2011 } | 2018 } |
2012 | 2019 |
2013 } // namespace content | 2020 } // namespace content |
OLD | NEW |