Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer_host/resource_dispatcher_host.h" | 7 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/debug/alias.h" | 16 #include "base/debug/alias.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
| 19 #include "base/message_loop.h" | 19 #include "base/message_loop.h" |
| 20 #include "base/metrics/histogram.h" | 20 #include "base/metrics/histogram.h" |
| 21 #include "base/shared_memory.h" | 21 #include "base/shared_memory.h" |
| 22 #include "base/stl_util.h" | 22 #include "base/stl_util.h" |
| 23 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" | 23 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" |
| 24 #include "content/browser/appcache/chrome_appcache_service.h" | 24 #include "content/browser/appcache/chrome_appcache_service.h" |
| 25 #include "content/browser/cert_store.h" | 25 #include "content/browser/cert_store.h" |
| 26 #include "content/browser/child_process_security_policy.h" | 26 #include "content/browser/child_process_security_policy.h" |
| 27 #include "content/browser/chrome_blob_storage_context.h" | 27 #include "content/browser/chrome_blob_storage_context.h" |
| 28 #include "content/browser/cross_site_request_manager.h" | 28 #include "content/browser/cross_site_request_manager.h" |
| 29 #include "content/browser/download/download_file_manager.h" | 29 #include "content/browser/download/download_file_manager.h" |
| 30 #include "content/browser/download/download_file_impl.h" | |
|
Randy Smith (Not in Mondays)
2011/12/07 20:57:41
Why do we need this header inclusion?
ahendrickson
2011/12/07 21:11:17
We don't -- I forgot to remove it during a previou
ahendrickson
2011/12/07 22:06:58
(Removed)
| |
| 30 #include "content/browser/download/download_id_factory.h" | 31 #include "content/browser/download/download_id_factory.h" |
| 31 #include "content/browser/download/download_manager.h" | 32 #include "content/browser/download/download_manager.h" |
| 32 #include "content/browser/download/download_resource_handler.h" | 33 #include "content/browser/download/download_resource_handler.h" |
| 33 #include "content/browser/download/save_file_manager.h" | 34 #include "content/browser/download/save_file_manager.h" |
| 34 #include "content/browser/download/save_file_resource_handler.h" | 35 #include "content/browser/download/save_file_resource_handler.h" |
| 35 #include "content/browser/plugin_service.h" | 36 #include "content/browser/plugin_service.h" |
| 36 #include "content/browser/renderer_host/async_resource_handler.h" | 37 #include "content/browser/renderer_host/async_resource_handler.h" |
| 37 #include "content/browser/renderer_host/buffered_resource_handler.h" | 38 #include "content/browser/renderer_host/buffered_resource_handler.h" |
| 38 #include "content/browser/renderer_host/cross_site_resource_handler.h" | 39 #include "content/browser/renderer_host/cross_site_resource_handler.h" |
| 39 #include "content/browser/renderer_host/global_request_id.h" | 40 #include "content/browser/renderer_host/global_request_id.h" |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 render_view_id); | 286 render_view_id); |
| 286 if (rvh) | 287 if (rvh) |
| 287 rvh->OnSwapOutACK(); | 288 rvh->OnSwapOutACK(); |
| 288 } | 289 } |
| 289 | 290 |
| 290 } // namespace | 291 } // namespace |
| 291 | 292 |
| 292 ResourceDispatcherHost::ResourceDispatcherHost( | 293 ResourceDispatcherHost::ResourceDispatcherHost( |
| 293 const ResourceQueue::DelegateSet& resource_queue_delegates) | 294 const ResourceQueue::DelegateSet& resource_queue_delegates) |
| 294 : ALLOW_THIS_IN_INITIALIZER_LIST( | 295 : ALLOW_THIS_IN_INITIALIZER_LIST( |
| 295 download_file_manager_(new DownloadFileManager(this))), | 296 download_file_manager_(new DownloadFileManager(this, NULL))), |
| 296 ALLOW_THIS_IN_INITIALIZER_LIST( | 297 ALLOW_THIS_IN_INITIALIZER_LIST( |
| 297 save_file_manager_(new SaveFileManager(this))), | 298 save_file_manager_(new SaveFileManager(this))), |
| 298 request_id_(-1), | 299 request_id_(-1), |
| 299 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), | 300 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), |
| 300 is_shutdown_(false), | 301 is_shutdown_(false), |
| 301 max_outstanding_requests_cost_per_process_( | 302 max_outstanding_requests_cost_per_process_( |
| 302 kMaxOutstandingRequestsCostPerProcess), | 303 kMaxOutstandingRequestsCostPerProcess), |
| 303 filter_(NULL), | 304 filter_(NULL), |
| 304 delegate_(NULL), | 305 delegate_(NULL), |
| 305 allow_cross_origin_auth_prompt_(false) { | 306 allow_cross_origin_auth_prompt_(false) { |
| (...skipping 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2235 | 2236 |
| 2236 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { | 2237 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { |
| 2237 allow_cross_origin_auth_prompt_ = value; | 2238 allow_cross_origin_auth_prompt_ = value; |
| 2238 } | 2239 } |
| 2239 | 2240 |
| 2240 void ResourceDispatcherHost::MarkAsTransferredNavigation( | 2241 void ResourceDispatcherHost::MarkAsTransferredNavigation( |
| 2241 const GlobalRequestID& transferred_request_id, | 2242 const GlobalRequestID& transferred_request_id, |
| 2242 net::URLRequest* ransferred_request) { | 2243 net::URLRequest* ransferred_request) { |
| 2243 transferred_navigations_[transferred_request_id] = ransferred_request; | 2244 transferred_navigations_[transferred_request_id] = ransferred_request; |
| 2244 } | 2245 } |
| OLD | NEW |