Chromium Code Reviews| 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 // 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 #ifndef CONTENT_CHILD_RESOURCE_DISPATCHER_H_ | 7 #ifndef CONTENT_CHILD_RESOURCE_DISPATCHER_H_ |
| 8 #define CONTENT_CHILD_RESOURCE_DISPATCHER_H_ | 8 #define CONTENT_CHILD_RESOURCE_DISPATCHER_H_ |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 203 // Iterate through a message queue and clean up the messages by calling | 203 // Iterate through a message queue and clean up the messages by calling |
| 204 // ReleaseResourcesInDataMessage and removing them from the queue. Intended | 204 // ReleaseResourcesInDataMessage and removing them from the queue. Intended |
| 205 // for use on deferred message queues that are no longer needed. | 205 // for use on deferred message queues that are no longer needed. |
| 206 static void ReleaseResourcesInMessageQueue(MessageQueue* queue); | 206 static void ReleaseResourcesInMessageQueue(MessageQueue* queue); |
| 207 | 207 |
| 208 IPC::Sender* message_sender_; | 208 IPC::Sender* message_sender_; |
| 209 | 209 |
| 210 // All pending requests issued to the host | 210 // All pending requests issued to the host |
| 211 PendingRequestList pending_requests_; | 211 PendingRequestList pending_requests_; |
| 212 | 212 |
| 213 base::WeakPtrFactory<ResourceDispatcher> weak_factory_; | |
| 214 | |
| 215 ResourceDispatcherDelegate* delegate_; | 213 ResourceDispatcherDelegate* delegate_; |
| 216 | 214 |
| 217 // IO thread timestamp for ongoing IPC message. | 215 // IO thread timestamp for ongoing IPC message. |
| 218 base::TimeTicks io_timestamp_; | 216 base::TimeTicks io_timestamp_; |
| 219 | 217 |
| 218 // Member variables should appear before the WeakPtrFactory, to ensure | |
| 219 // that any WeakPtrs to Controller are invalidated before its members | |
| 220 // variable's destructors are executed, rendering them invalid. | |
| 221 base::WeakPtrFactory<ResourceDispatcher> weak_factory_; | |
|
Avi (use Gerrit)
2014/09/12 05:55:01
You don't need that explanatory comment. That's tr
MRV
2014/09/12 06:06:32
Done.
| |
| 222 | |
| 220 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); | 223 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); |
| 221 }; | 224 }; |
| 222 | 225 |
| 223 } // namespace content | 226 } // namespace content |
| 224 | 227 |
| 225 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_ | 228 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_ |
| OLD | NEW |