| 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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 | 495 |
| 496 // Collection of temp files downloaded for child processes via | 496 // Collection of temp files downloaded for child processes via |
| 497 // the download_to_file mechanism. We avoid deleting them until | 497 // the download_to_file mechanism. We avoid deleting them until |
| 498 // the client no longer needs them. | 498 // the client no longer needs them. |
| 499 typedef std::map<int, scoped_refptr<storage::ShareableFileReference> > | 499 typedef std::map<int, scoped_refptr<storage::ShareableFileReference> > |
| 500 DeletableFilesMap; // key is request id | 500 DeletableFilesMap; // key is request id |
| 501 typedef std::map<int, DeletableFilesMap> | 501 typedef std::map<int, DeletableFilesMap> |
| 502 RegisteredTempFiles; // key is child process id | 502 RegisteredTempFiles; // key is child process id |
| 503 RegisteredTempFiles registered_temp_files_; | 503 RegisteredTempFiles registered_temp_files_; |
| 504 | 504 |
| 505 // A timer that periodically calls UpdateLoadStates while pending_requests_ | 505 // A timer that periodically calls UpdateLoadInfo while pending_loaders_ is |
| 506 // is not empty. | 506 // not empty and at least one RenderViewHost is loading. |
| 507 scoped_ptr<base::RepeatingTimer<ResourceDispatcherHostImpl> > | 507 scoped_ptr<base::RepeatingTimer<ResourceDispatcherHostImpl> > |
| 508 update_load_states_timer_; | 508 update_load_states_timer_; |
| 509 | 509 |
| 510 // We own the save file manager. | 510 // We own the save file manager. |
| 511 scoped_refptr<SaveFileManager> save_file_manager_; | 511 scoped_refptr<SaveFileManager> save_file_manager_; |
| 512 | 512 |
| 513 // Request ID for browser initiated requests. request_ids generated by | 513 // Request ID for browser initiated requests. request_ids generated by |
| 514 // child processes are counted up from 0, while browser created requests | 514 // child processes are counted up from 0, while browser created requests |
| 515 // start at -2 and go down from there. (We need to start at -2 because -1 is | 515 // start at -2 and go down from there. (We need to start at -2 because -1 is |
| 516 // used as a special value all over the resource_dispatcher_host for | 516 // used as a special value all over the resource_dispatcher_host for |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 DelegateMap delegate_map_; | 578 DelegateMap delegate_map_; |
| 579 | 579 |
| 580 scoped_ptr<ResourceScheduler> scheduler_; | 580 scoped_ptr<ResourceScheduler> scheduler_; |
| 581 | 581 |
| 582 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 582 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 583 }; | 583 }; |
| 584 | 584 |
| 585 } // namespace content | 585 } // namespace content |
| 586 | 586 |
| 587 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 587 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |