Add a RENDERER_PROCESS_CLOSED notification that gets sent when we close the
RenderProcessHost's process_.  This is similar to RENDER_PROCESS_TERMINATED,
but the latter is not always sent since the process could get reused.  It also
takes the place of RENDERER_PROCESS_CRASHED, where this one contains a boolean
Details indicating whether the process crashed (true) or just exited (false).
Review URL: http://codereview.chromium.org/100277

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15261 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index c54b36e..21adc52e 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -505,8 +505,9 @@
       LogLoadStarted();
       break;
 
-    case NotificationType::RENDERER_PROCESS_CRASHED:
-      LogRendererCrash();
+    case NotificationType::RENDERER_PROCESS_CLOSED:
+      if (*Details<bool>(details).ptr())
+        LogRendererCrash();
       break;
 
     case NotificationType::RENDERER_PROCESS_HANG:
@@ -796,7 +797,7 @@
   AddOrRemoveObserver(this, NotificationType::LOAD_STOP, start_listening);
   AddOrRemoveObserver(this, NotificationType::RENDERER_PROCESS_IN_SBOX,
                       start_listening);
-  AddOrRemoveObserver(this, NotificationType::RENDERER_PROCESS_CRASHED,
+  AddOrRemoveObserver(this, NotificationType::RENDERER_PROCESS_CLOSED,
                       start_listening);
   AddOrRemoveObserver(this, NotificationType::RENDERER_PROCESS_HANG,
                       start_listening);