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

Unified Diff: chrome/browser/extensions/extension_host.cc

Issue 492014: Extensions: don't send EXTENSION_PROCESS_CRASHED when the extension process i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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/extension_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_host.cc
===================================================================
--- chrome/browser/extensions/extension_host.cc (revision 34318)
+++ chrome/browser/extensions/extension_host.cc (working copy)
@@ -131,6 +131,8 @@
// to the task manager then.
registrar_.Add(this, NotificationType::RENDERER_PROCESS_CREATED,
Source<RenderProcessHost>(render_process_host()));
+ registrar_.Add(this, NotificationType::RENDERER_PROCESS_CLOSED,
+ Source<RenderProcessHost>(render_process_host()));
}
ExtensionHost::~ExtensionHost() {
@@ -231,6 +233,18 @@
NotificationType::EXTENSION_PROCESS_CREATED,
Source<Profile>(profile_),
Details<ExtensionHost>(this));
+ } else if (type == NotificationType::RENDERER_PROCESS_CLOSED) {
+ Details<RenderProcessHost::RendererClosedDetails> closed_details =
+ static_cast<Details<RenderProcessHost::RendererClosedDetails> >(
+ details);
+ if (!closed_details->did_crash)
+ return;
+
Matt Perry 2009/12/11 01:54:52 nit: add DCHECK(closed_details->was_extension_rend
+ LOG(INFO) << "Sending EXTENSION_PROCESS_CRASHED for " + extension_->name();
+ NotificationService::current()->Notify(
+ NotificationType::EXTENSION_PROCESS_CRASHED,
+ Source<Profile>(profile_),
+ Details<ExtensionHost>(this));
} else {
NOTREACHED();
}
@@ -241,15 +255,6 @@
view_->UpdatePreferredSize(new_size);
}
-void ExtensionHost::RenderViewGone(RenderViewHost* render_view_host) {
- LOG(INFO) << "Sending EXTENSION_PROCESS_CRASHED for " + extension_->name();
- DCHECK_EQ(render_view_host_, render_view_host);
- NotificationService::current()->Notify(
- NotificationType::EXTENSION_PROCESS_CRASHED,
- Source<Profile>(profile_),
- Details<ExtensionHost>(this));
-}
-
void ExtensionHost::DidNavigate(RenderViewHost* render_view_host,
const ViewHostMsg_FrameNavigate_Params& params) {
// We only care when the outer frame changes.
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698