OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ | 5 #ifndef EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ |
6 #define EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ | 6 #define EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 // Any interruption obtains a new ID by incrementing | 307 // Any interruption obtains a new ID by incrementing |
308 // last_background_close_sequence_id_ and storing it in background_page_data_ | 308 // last_background_close_sequence_id_ and storing it in background_page_data_ |
309 // for a particular extension. Callbacks and round-trip IPC messages store the | 309 // for a particular extension. Callbacks and round-trip IPC messages store the |
310 // value of the extension's close_sequence_id at the beginning of the process. | 310 // value of the extension's close_sequence_id at the beginning of the process. |
311 // Thus comparisons can be done to halt when IDs no longer match. | 311 // Thus comparisons can be done to halt when IDs no longer match. |
312 // | 312 // |
313 // This counter provides unique IDs even when BackgroundPageData objects are | 313 // This counter provides unique IDs even when BackgroundPageData objects are |
314 // reset. | 314 // reset. |
315 uint64 last_background_close_sequence_id_; | 315 uint64 last_background_close_sequence_id_; |
316 | 316 |
| 317 // Tracks pending network requests by opaque ID. This is used to ensure proper |
| 318 // keepalive counting in response to request status updates; e.g., if an |
| 319 // extension URLRequest is constructed and then destroyed without ever |
| 320 // starting, we can receive a completion notification without a corresponding |
| 321 // start notification. In that case we want to avoid decrementing keepalive. |
| 322 std::set<int> pending_network_requests_; |
| 323 |
317 // Must be last member, see doc on WeakPtrFactory. | 324 // Must be last member, see doc on WeakPtrFactory. |
318 base::WeakPtrFactory<ProcessManager> weak_ptr_factory_; | 325 base::WeakPtrFactory<ProcessManager> weak_ptr_factory_; |
319 | 326 |
320 DISALLOW_COPY_AND_ASSIGN(ProcessManager); | 327 DISALLOW_COPY_AND_ASSIGN(ProcessManager); |
321 }; | 328 }; |
322 | 329 |
323 } // namespace extensions | 330 } // namespace extensions |
324 | 331 |
325 #endif // EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ | 332 #endif // EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ |
OLD | NEW |