Chromium Code Reviews| Index: content/browser/loader/resource_dispatcher_host_impl.h |
| diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h |
| index 152cbbd77e46f8c6918970b5a9029d405b6cddf1..09afb39616a4e06df0e41da760e333efa187ae6a 100644 |
| --- a/content/browser/loader/resource_dispatcher_host_impl.h |
| +++ b/content/browser/loader/resource_dispatcher_host_impl.h |
| @@ -491,6 +491,12 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
| int child_id, |
| bool is_sync_load); |
| + // Schedules UpdateLoadInfo() to be invoked after a delay (for coalescing). |
| + // This is only necessary when a page is loading or if there is an upload in |
| + // progress. We want to avoid repeatedly calling this when we have a "hanging |
| + // get" request like when on a Google Docs document. |
|
mmenke
2015/05/21 15:53:25
nit: Don't use "we" in comments, due to ambiguity
Andre
2015/05/21 22:05:39
Done.
|
| + void ScheduleUpdateLoadInfo(); |
| + |
| LoaderMap pending_loaders_; |
| // Collection of temp files downloaded for child processes via |
| @@ -502,9 +508,8 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
| RegisteredTempFiles; // key is child process id |
| RegisteredTempFiles registered_temp_files_; |
| - // A timer that periodically calls UpdateLoadStates while pending_requests_ |
| - // is not empty. |
| - scoped_ptr<base::RepeatingTimer<ResourceDispatcherHostImpl> > |
| + // A timer for scheduling a call to UpdateLoadInfo after a delay. |
| + scoped_ptr<base::OneShotTimer<ResourceDispatcherHostImpl> > |
| update_load_states_timer_; |
| // We own the save file manager. |