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 // This is the browser side of the resource dispatcher, it receives requests | 5 // This is the browser side of the resource dispatcher, it receives requests |
6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and | 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and |
7 // dispatches them to URLRequests. It then forwards the messages from the | 7 // dispatches them to URLRequests. It then forwards the messages from the |
8 // URLRequests back to the correct process for handling. | 8 // URLRequests back to the correct process for handling. |
9 // | 9 // |
10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 } | 147 } |
148 void set_max_num_in_flight_requests(int limit) { | 148 void set_max_num_in_flight_requests(int limit) { |
149 max_num_in_flight_requests_ = limit; | 149 max_num_in_flight_requests_ = limit; |
150 } | 150 } |
151 | 151 |
152 // The average private bytes increase of the browser for each new pending | 152 // The average private bytes increase of the browser for each new pending |
153 // request. Experimentally obtained. | 153 // request. Experimentally obtained. |
154 static const int kAvgBytesPerOutstandingRequest = 4400; | 154 static const int kAvgBytesPerOutstandingRequest = 4400; |
155 | 155 |
156 SaveFileManager* save_file_manager() const { | 156 SaveFileManager* save_file_manager() const { |
157 return save_file_manager_; | 157 return save_file_manager_.get(); |
158 } | 158 } |
159 | 159 |
160 // Called when the unload handler for a cross-site request has finished. | 160 // Called when the unload handler for a cross-site request has finished. |
161 void OnSwapOutACK(const ViewMsg_SwapOut_Params& params); | 161 void OnSwapOutACK(const ViewMsg_SwapOut_Params& params); |
162 | 162 |
163 // Called when we want to simulate the renderer process sending | 163 // Called when we want to simulate the renderer process sending |
164 // ViewHostMsg_SwapOut_ACK in cases where the renderer has died or is | 164 // ViewHostMsg_SwapOut_ACK in cases where the renderer has died or is |
165 // unresponsive. | 165 // unresponsive. |
166 void OnSimulateSwapOutACK(const ViewMsg_SwapOut_Params& params); | 166 void OnSimulateSwapOutACK(const ViewMsg_SwapOut_Params& params); |
167 | 167 |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; | 510 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; |
511 | 511 |
512 OfflineMap offline_policy_map_; | 512 OfflineMap offline_policy_map_; |
513 | 513 |
514 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 514 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
515 }; | 515 }; |
516 | 516 |
517 } // namespace content | 517 } // namespace content |
518 | 518 |
519 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 519 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |