Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Side by Side Diff: gpu/ipc/service/gpu_watchdog_thread.cc

Issue 2787363003: gpu: Add a couple of unit-tests for GpuService. (Closed)
Patch Set: tot merge Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gpu/ipc/service/gpu_watchdog_thread.h ('k') | services/ui/gpu/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "gpu/ipc/service/gpu_watchdog_thread.h" 5 #include "gpu/ipc/service/gpu_watchdog_thread.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/debug/alias.h" 14 #include "base/debug/alias.h"
15 #include "base/files/file_util.h" 15 #include "base/files/file_util.h"
16 #include "base/location.h" 16 #include "base/location.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/ptr_util.h" 18 #include "base/memory/ptr_util.h"
19 #include "base/power_monitor/power_monitor.h" 19 #include "base/power_monitor/power_monitor.h"
20 #include "base/process/process.h" 20 #include "base/process/process.h"
21 #include "base/single_thread_task_runner.h" 21 #include "base/single_thread_task_runner.h"
22 #include "base/threading/platform_thread.h" 22 #include "base/threading/platform_thread.h"
23 #include "build/build_config.h" 23 #include "build/build_config.h"
24 24
25 #if defined(OS_WIN) 25 #if defined(OS_WIN)
26 #include <windows.h> 26 #include <windows.h>
27 #endif 27 #endif
28 28
29 #if defined(USE_X11)
30 #include <X11/Xatom.h>
31 #include <X11/Xlib.h>
32 #endif
33
29 namespace gpu { 34 namespace gpu {
30 namespace { 35 namespace {
31 36
32 #if defined(CYGPROFILE_INSTRUMENTATION) 37 #if defined(CYGPROFILE_INSTRUMENTATION)
33 const int kGpuTimeout = 30000; 38 const int kGpuTimeout = 30000;
34 #elif defined(OS_WIN) 39 #elif defined(OS_WIN)
35 // Use a slightly longer timeout on Windows due to prevalence of slow and 40 // Use a slightly longer timeout on Windows due to prevalence of slow and
36 // infected machines. 41 // infected machines.
37 const int kGpuTimeout = 15000; 42 const int kGpuTimeout = 15000;
38 #else 43 #else
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 int tty_number; 515 int tty_number;
511 size_t num_res = sscanf(tty_string, "tty%d\n", &tty_number); 516 size_t num_res = sscanf(tty_string, "tty%d\n", &tty_number);
512 if (num_res == 1) 517 if (num_res == 1)
513 return tty_number; 518 return tty_number;
514 } 519 }
515 return -1; 520 return -1;
516 } 521 }
517 #endif 522 #endif
518 523
519 } // namespace gpu 524 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_watchdog_thread.h ('k') | services/ui/gpu/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698