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

Side by Side Diff: chrome/browser/extensions/extension_process_manager.h

Issue 355032: Fix a bug where we'd leak ResourceMessageFilters and BrowserRenderProcessHosts (Closed)
Patch Set: revert accidental change Created 11 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_process_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 typedef std::set<ExtensionHost*> ExtensionHostSet; 77 typedef std::set<ExtensionHost*> ExtensionHostSet;
78 typedef ExtensionHostSet::const_iterator const_iterator; 78 typedef ExtensionHostSet::const_iterator const_iterator;
79 const_iterator begin() const { return all_hosts_.begin(); } 79 const_iterator begin() const { return all_hosts_.begin(); }
80 const_iterator end() const { return all_hosts_.end(); } 80 const_iterator end() const { return all_hosts_.end(); }
81 81
82 private: 82 private:
83 // Called just after |host| is created so it can be registered in our lists. 83 // Called just after |host| is created so it can be registered in our lists.
84 void OnExtensionHostCreated(ExtensionHost* host, bool is_background); 84 void OnExtensionHostCreated(ExtensionHost* host, bool is_background);
85 85
86 // Called on browser shutdown to close our extension hosts.
87 void CloseBackgroundHosts();
88
86 NotificationRegistrar registrar_; 89 NotificationRegistrar registrar_;
87 90
88 // The set of all ExtensionHosts managed by this process manager. 91 // The set of all ExtensionHosts managed by this process manager.
89 ExtensionHostSet all_hosts_; 92 ExtensionHostSet all_hosts_;
90 93
91 // The set of running viewless background extensions. 94 // The set of running viewless background extensions.
92 ExtensionHostSet background_hosts_; 95 ExtensionHostSet background_hosts_;
93 96
94 // The BrowsingInstance shared by all extensions in this profile. This 97 // The BrowsingInstance shared by all extensions in this profile. This
95 // controls process grouping. 98 // controls process grouping.
96 scoped_refptr<BrowsingInstance> browsing_instance_; 99 scoped_refptr<BrowsingInstance> browsing_instance_;
97 100
98 // A map of extension ID to the render_process_id that the extension lives in. 101 // A map of extension ID to the render_process_id that the extension lives in.
99 typedef std::map<std::string, int> ProcessIDMap; 102 typedef std::map<std::string, int> ProcessIDMap;
100 ProcessIDMap process_ids_; 103 ProcessIDMap process_ids_;
101 104
102 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager); 105 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager);
103 }; 106 };
104 107
105 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ 108 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698