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

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

Issue 126289: Graceful handling of extension process crashes (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 6 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 unified diff | Download patch | Annotate | Revision Log
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 <set> 8 #include <set>
9 9
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 typedef std::set<ExtensionHost*> ExtensionHostSet; 51 typedef std::set<ExtensionHost*> ExtensionHostSet;
52 typedef ExtensionHostSet::const_iterator const_iterator; 52 typedef ExtensionHostSet::const_iterator const_iterator;
53 const_iterator begin() const { return all_hosts_.begin(); } 53 const_iterator begin() const { return all_hosts_.begin(); }
54 const_iterator end() const { return all_hosts_.end(); } 54 const_iterator end() const { return all_hosts_.end(); }
55 55
56 // Called just before |host| is destroyed so it can be de-registered 56 // Called just before |host| is destroyed so it can be de-registered
57 // from our lists. 57 // from our lists.
58 void OnExtensionHostDestroyed(ExtensionHost* host); 58 void OnExtensionHostDestroyed(ExtensionHost* host);
59 59
60 // Called after an extension render process crashes.
61 void OnExtensionProcessCrashed(ExtensionHost* host);
62
63 // Called after an extension process successfully restarts after crash.
64 void OnExtensionProcessRestored(ExtensionHost* host);
65
60 private: 66 private:
61 // Called just after |host| is created so it can be registered in our lists. 67 // Called just after |host| is created so it can be registered in our lists.
62 void OnExtensionHostCreated(ExtensionHost* host, bool is_background); 68 void OnExtensionHostCreated(ExtensionHost* host, bool is_background);
63 69
64 NotificationRegistrar registrar_; 70 NotificationRegistrar registrar_;
65 71
66 // The set of all ExtensionHosts managed by this process manager. 72 // The set of all ExtensionHosts managed by this process manager.
67 ExtensionHostSet all_hosts_; 73 ExtensionHostSet all_hosts_;
68 74
69 // The set of running viewless background extensions. 75 // The set of running viewless background extensions.
70 ExtensionHostSet background_hosts_; 76 ExtensionHostSet background_hosts_;
71 77
72 // The BrowsingInstance shared by all extensions in this profile. This 78 // The BrowsingInstance shared by all extensions in this profile. This
73 // controls process grouping. 79 // controls process grouping.
74 scoped_refptr<BrowsingInstance> browsing_instance_; 80 scoped_refptr<BrowsingInstance> browsing_instance_;
75 81
76 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager); 82 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager);
77 }; 83 };
78 84
79 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ 85 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/extensions/extension_process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698