Index: content/shell/shell_content_browser_client.cc |
diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc |
index 54c424a040689d093c28edeab8029b9ed65f9d7f..6993f3162ea41d297d91720e8dbe6ebe335db955 100644 |
--- a/content/shell/shell_content_browser_client.cc |
+++ b/content/shell/shell_content_browser_client.cc |
@@ -91,6 +91,9 @@ void ShellContentBrowserClient::RenderProcessHostCreated( |
registrar_.Add(this, |
NOTIFICATION_RENDERER_PROCESS_CREATED, |
Source<RenderProcessHost>(host)); |
+ registrar_.Add(this, |
+ NOTIFICATION_RENDERER_PROCESS_TERMINATED, |
+ Source<RenderProcessHost>(host)); |
} |
net::URLRequestContextGetter* ShellContentBrowserClient::CreateRequestContext( |
@@ -212,6 +215,9 @@ void ShellContentBrowserClient::Observe(int type, |
registrar_.Remove(this, |
NOTIFICATION_RENDERER_PROCESS_CREATED, |
source); |
+ registrar_.Remove(this, |
+ NOTIFICATION_RENDERER_PROCESS_TERMINATED, |
+ source); |
if (hyphen_dictionary_file_ != base::kInvalidPlatformFileValue) { |
RenderProcessHost* host = Source<RenderProcessHost>(source).ptr(); |
IPC::PlatformFileForTransit file = IPC::GetFileHandleForProcess( |
@@ -221,6 +227,16 @@ void ShellContentBrowserClient::Observe(int type, |
break; |
} |
+ case NOTIFICATION_RENDERER_PROCESS_TERMINATED: { |
+ registrar_.Remove(this, |
+ NOTIFICATION_RENDERER_PROCESS_CREATED, |
+ source); |
+ registrar_.Remove(this, |
+ NOTIFICATION_RENDERER_PROCESS_TERMINATED, |
+ source); |
+ break; |
+ } |
+ |
default: |
NOTREACHED(); |
} |