| Index: content/browser/gpu/gpu_process_host.cc
|
| diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
|
| index 161855ad20dbac03efa8f68b20d6d49c177d5d5b..62e1780eea7d04e9ad9c2b526beb05eb82437b8d 100644
|
| --- a/content/browser/gpu/gpu_process_host.cc
|
| +++ b/content/browser/gpu/gpu_process_host.cc
|
| @@ -15,6 +15,7 @@
|
| #include "base/bind.h"
|
| #include "base/callback_helpers.h"
|
| #include "base/command_line.h"
|
| +#include "base/files/file_util.h"
|
| #include "base/logging.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| @@ -35,6 +36,7 @@
|
| #include "content/common/child_process_host_impl.h"
|
| #include "content/common/establish_channel_params.h"
|
| #include "content/common/gpu_host_messages.h"
|
| +#include "content/common/gpu_watchdog_utils.h"
|
| #include "content/common/in_process_child_thread_params.h"
|
| #include "content/common/view_messages.h"
|
| #include "content/public/browser/browser_thread.h"
|
| @@ -264,6 +266,17 @@ class GpuSandboxedProcessLauncherDelegate
|
| }
|
| }
|
|
|
| + // Enable GPU watchdog to write to a temp file to delay crashing when
|
| + // there is a high I/O activitiy.
|
| + base::FilePath temp_file_path;
|
| + if (content::GetGpuWatchdogTempFile(&temp_file_path)) {
|
| + result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
|
| + sandbox::TargetPolicy::FILES_ALLOW_ANY,
|
| + temp_file_path.value().c_str());
|
| + if (result != sandbox::SBOX_ALL_OK)
|
| + return false;
|
| + }
|
| +
|
| return true;
|
| }
|
| #elif defined(OS_POSIX)
|
|
|