Chromium Code Reviews| Index: content/browser/gpu/gpu_process_host_ui_shim.cc |
| diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc |
| index b17bc59faae752ffa98445671ceac7261a81bcdb..cfdc35101182067ddad6cde11e07312a9fe63804 100644 |
| --- a/content/browser/gpu/gpu_process_host_ui_shim.cc |
| +++ b/content/browser/gpu/gpu_process_host_ui_shim.cc |
| @@ -11,6 +11,7 @@ |
| #include "base/debug/trace_event.h" |
| #include "base/id_map.h" |
| #include "base/lazy_instance.h" |
| +#include "base/process/kill.h" |
| #include "base/strings/string_number_conversions.h" |
| #include "content/browser/gpu/gpu_data_manager_impl.h" |
| #include "content/browser/gpu/gpu_process_host.h" |
| @@ -20,6 +21,8 @@ |
| #include "content/common/gpu/gpu_messages.h" |
| #include "content/port/browser/render_widget_host_view_port.h" |
| #include "content/public/browser/browser_thread.h" |
| +#include "content/public/browser/notification_service.h" |
| +#include "content/public/browser/notification_types.h" |
| #include "ui/gl/gl_switches.h" |
| // From gl2/gl2ext.h. |
| @@ -106,7 +109,18 @@ GpuProcessHostUIShim* GpuProcessHostUIShim::Create(int host_id) { |
| } |
| // static |
| -void GpuProcessHostUIShim::Destroy(int host_id, const std::string& message) { |
| +void GpuProcessHostUIShim::Destroy(int host_id, |
| + base::TerminationStatus status, |
| + const std::string& message) { |
| + // If the GPU process did not turn down normally, we send a notification. This |
| + // is used to signal a gpu crash in the metrics service. |
|
Alexei Svitkine (slow)
2013/12/16 16:04:28
Nit: Avoid "we". How about:
"Send a notification
rkaplow
2013/12/16 16:39:54
Done.
|
| + if (status != base::TERMINATION_STATUS_NORMAL_TERMINATION) { |
| + content::NotificationService::current()->Notify( |
| + content::NOTIFICATION_GPU_PROCESS_CLOSED_ABNORMALLY, |
| + NotificationService::AllSources(), |
| + NotificationService::NoDetails()); |
| + } |
| + |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| GpuDataManagerImpl::GetInstance()->AddLogMessage( |