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..be040584efa82f92ea5cef8bd15dcee3ea711fa6 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,17 @@ 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, |
|
Alexei Svitkine (slow)
2013/12/13 22:37:22
Nit: 1 param per line.
rkaplow
2013/12/13 23:54:03
Done.
|
| + 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. |
| + if (status != base::TERMINATION_STATUS_NORMAL_TERMINATION) { |
| + content::NotificationService::current()->Notify( |
| + content::NOTIFICATION_GPU_PROCESS_CLOSED, |
|
Alexei Svitkine (slow)
2013/12/13 22:37:22
Nit: Indent 2 more, here and the lines below.
rkaplow
2013/12/13 23:54:03
Done.
|
| + NotificationService::AllSources(), |
| + NotificationService::NoDetails()); |
| + } |
| + |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| GpuDataManagerImpl::GetInstance()->AddLogMessage( |