Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: extensions/browser/process_manager.h

Issue 1366393002: Prevent imbalanced keepalive counts in ProcessManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/process_manager_browsertest.cc ('k') | extensions/browser/process_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/process_manager.h
diff --git a/extensions/browser/process_manager.h b/extensions/browser/process_manager.h
index 85f2defa286f403fae88f88d04574eee77780dcb..9d444531df29e68481938230a849b7bb02354553 100644
--- a/extensions/browser/process_manager.h
+++ b/extensions/browser/process_manager.h
@@ -314,6 +314,13 @@ class ProcessManager : public KeyedService,
// reset.
uint64 last_background_close_sequence_id_;
+ // Tracks pending network requests by opaque ID. This is used to ensure proper
+ // keepalive counting in response to request status updates; e.g., if an
+ // extension URLRequest is constructed and then destroyed without ever
+ // starting, we can receive a completion notification without a corresponding
+ // start notification. In that case we want to avoid decrementing keepalive.
+ std::set<int> pending_network_requests_;
+
// Must be last member, see doc on WeakPtrFactory.
base::WeakPtrFactory<ProcessManager> weak_ptr_factory_;
« no previous file with comments | « chrome/browser/extensions/process_manager_browsertest.cc ('k') | extensions/browser/process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698