| 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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 // the download_to_file mechanism. We avoid deleting them until | 515 // the download_to_file mechanism. We avoid deleting them until |
| 516 // the client no longer needs them. | 516 // the client no longer needs them. |
| 517 typedef std::map<int, scoped_refptr<storage::ShareableFileReference> > | 517 typedef std::map<int, scoped_refptr<storage::ShareableFileReference> > |
| 518 DeletableFilesMap; // key is request id | 518 DeletableFilesMap; // key is request id |
| 519 typedef std::map<int, DeletableFilesMap> | 519 typedef std::map<int, DeletableFilesMap> |
| 520 RegisteredTempFiles; // key is child process id | 520 RegisteredTempFiles; // key is child process id |
| 521 RegisteredTempFiles registered_temp_files_; | 521 RegisteredTempFiles registered_temp_files_; |
| 522 | 522 |
| 523 // A timer that periodically calls UpdateLoadInfo while pending_loaders_ is | 523 // A timer that periodically calls UpdateLoadInfo while pending_loaders_ is |
| 524 // not empty and at least one RenderViewHost is loading. | 524 // not empty and at least one RenderViewHost is loading. |
| 525 scoped_ptr<base::RepeatingTimer<ResourceDispatcherHostImpl> > | 525 scoped_ptr<base::RepeatingTimer> update_load_states_timer_; |
| 526 update_load_states_timer_; | |
| 527 | 526 |
| 528 // We own the save file manager. | 527 // We own the save file manager. |
| 529 scoped_refptr<SaveFileManager> save_file_manager_; | 528 scoped_refptr<SaveFileManager> save_file_manager_; |
| 530 | 529 |
| 531 // Request ID for browser initiated requests. request_ids generated by | 530 // Request ID for browser initiated requests. request_ids generated by |
| 532 // child processes are counted up from 0, while browser created requests | 531 // child processes are counted up from 0, while browser created requests |
| 533 // start at -2 and go down from there. (We need to start at -2 because -1 is | 532 // start at -2 and go down from there. (We need to start at -2 because -1 is |
| 534 // used as a special value all over the resource_dispatcher_host for | 533 // used as a special value all over the resource_dispatcher_host for |
| 535 // uninitialized variables.) This way, we no longer have the unlikely (but | 534 // uninitialized variables.) This way, we no longer have the unlikely (but |
| 536 // observed in the real world!) event where we have two requests with the same | 535 // observed in the real world!) event where we have two requests with the same |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 DelegateMap delegate_map_; | 595 DelegateMap delegate_map_; |
| 597 | 596 |
| 598 scoped_ptr<ResourceScheduler> scheduler_; | 597 scoped_ptr<ResourceScheduler> scheduler_; |
| 599 | 598 |
| 600 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 599 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 601 }; | 600 }; |
| 602 | 601 |
| 603 } // namespace content | 602 } // namespace content |
| 604 | 603 |
| 605 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 604 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |