summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cert_store.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-13 23:18:02 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-13 23:18:02 +0000
commit235caa47af34c2f68b26a38d46f1002e56f6cbfe (patch)
tree0c9394d1337957754d93b1a7c8ca54809f996fae /chrome/browser/cert_store.cc
parente9d2f166c90ccd612c7ba014c4066840053d5bee (diff)
downloadchromium_src-235caa47af34c2f68b26a38d46f1002e56f6cbfe.zip
chromium_src-235caa47af34c2f68b26a38d46f1002e56f6cbfe.tar.gz
chromium_src-235caa47af34c2f68b26a38d46f1002e56f6cbfe.tar.bz2
Don't overload the meaning of the RENDERER_PROCESS_TERMINATED notification, instead create a new one for crashing.
The old way of using notifications was incorrect since a RenderProcessHost might have sent only one notification even though a new renderer might have been created after a crash. BUG=9379 Review URL: http://codereview.chromium.org/66069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13629 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cert_store.cc')
-rw-r--r--chrome/browser/cert_store.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/cert_store.cc b/chrome/browser/cert_store.cc
index 7687a9f..84e6ab6 100644
--- a/chrome/browser/cert_store.cc
+++ b/chrome/browser/cert_store.cc
@@ -41,6 +41,9 @@ CertStore::CertStore() : next_cert_id_(1) {
NotificationService::current()->AddObserver(this,
NotificationType::RENDERER_PROCESS_TERMINATED,
NotificationService::AllSources());
+ NotificationService::current()->AddObserver(this,
+ NotificationType::RENDERER_PROCESS_CRASHED,
+ NotificationService::AllSources());
}
CertStore::~CertStore() {
@@ -135,7 +138,8 @@ void CertStore::RemoveCertsForRenderProcesHost(int process_id) {
void CertStore::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NotificationType::RENDERER_PROCESS_TERMINATED);
+ DCHECK(type == NotificationType::RENDERER_PROCESS_TERMINATED ||
+ type == NotificationType::RENDERER_PROCESS_CRASHED);
RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr();
DCHECK(rph);
RemoveCertsForRenderProcesHost(rph->pid());