OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if defined(OS_WIN) | 5 #if defined(OS_WIN) |
6 #include <windows.h> | 6 #include <windows.h> |
7 #endif | 7 #endif |
8 | 8 |
9 #include "content/gpu/gpu_watchdog_thread.h" | 9 #include "content/gpu/gpu_watchdog_thread.h" |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/file_util.h" | 15 #include "base/files/file_util.h" |
16 #include "base/power_monitor/power_monitor.h" | 16 #include "base/power_monitor/power_monitor.h" |
17 #include "base/process/process.h" | 17 #include "base/process/process.h" |
18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
19 #include "content/public/common/content_switches.h" | 19 #include "content/public/common/content_switches.h" |
20 #include "content/public/common/result_codes.h" | 20 #include "content/public/common/result_codes.h" |
21 | 21 |
22 namespace content { | 22 namespace content { |
23 namespace { | 23 namespace { |
24 const int64 kCheckPeriodMs = 2000; | 24 const int64 kCheckPeriodMs = 2000; |
25 #if defined(OS_CHROMEOS) | 25 #if defined(OS_CHROMEOS) |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 // not increasing. The other is where either the kernel hangs and never | 314 // not increasing. The other is where either the kernel hangs and never |
315 // returns to user level or where user level code | 315 // returns to user level or where user level code |
316 // calls into kernel level repeatedly, giving up its quanta before it is | 316 // calls into kernel level repeatedly, giving up its quanta before it is |
317 // tracked, for example a loop that repeatedly Sleeps. | 317 // tracked, for example a loop that repeatedly Sleeps. |
318 return base::TimeDelta::FromMilliseconds(static_cast<int64>( | 318 return base::TimeDelta::FromMilliseconds(static_cast<int64>( |
319 (user_time64.QuadPart + kernel_time64.QuadPart) / 10000)); | 319 (user_time64.QuadPart + kernel_time64.QuadPart) / 10000)); |
320 } | 320 } |
321 #endif | 321 #endif |
322 | 322 |
323 } // namespace content | 323 } // namespace content |
OLD | NEW |