Skip to content

Commit

Permalink
Gpu watchdog V1 test functions clean up
Browse files Browse the repository at this point in the history
Watch dog test functions SetAlternativeTerminateFunctionForTesting() and
SetTimeoutForTesting() are not used. Delete them.

Bug: 949839
Change-Id: I1bd01d02ac4fcac4297789b3aca2c8aa73f77510
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1662629
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670308}
  • Loading branch information
Maggie Chen authored and Commit Bot committed Jun 19, 2019
1 parent 1ca0074 commit b92bd85
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
14 changes: 0 additions & 14 deletions gpu/ipc/service/gpu_watchdog_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,6 @@ void GpuWatchdogThreadImplV1::DeliberatelyTerminateToRecoverFromHang() {
return;
}

if (alternative_terminate_for_testing_) {
alternative_terminate_for_testing_.Run();
return;
}

#if defined(OS_WIN)
// Defer termination until a certain amount of CPU time has elapsed on the
// watched thread.
Expand Down Expand Up @@ -623,15 +618,6 @@ int GpuWatchdogThreadImplV1::GetActiveTTY() const {
}
#endif

void GpuWatchdogThreadImplV1::SetAlternativeTerminateFunctionForTesting(
base::RepeatingClosure on_terminate) {
alternative_terminate_for_testing_ = std::move(on_terminate);
}

void GpuWatchdogThreadImplV1::SetTimeoutForTesting(base::TimeDelta timeout) {
timeout_ = timeout;
}

GpuWatchdogThread::GpuWatchdogThread() : base::Thread("GpuWatchdog") {}
GpuWatchdogThread::~GpuWatchdogThread() {}

Expand Down
7 changes: 0 additions & 7 deletions gpu/ipc/service/gpu_watchdog_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ class GPU_IPC_SERVICE_EXPORT GpuWatchdogThreadImplV1
void OnBackgrounded() override;
void OnForegrounded() override;

// Test only functions. Not thread safe - set before arming.
void SetAlternativeTerminateFunctionForTesting(
base::RepeatingClosure on_terminate);
void SetTimeoutForTesting(base::TimeDelta timeout);

protected:
void Init() override;
void CleanUp() override;
Expand Down Expand Up @@ -215,8 +210,6 @@ class GPU_IPC_SERVICE_EXPORT GpuWatchdogThreadImplV1
int host_tty_;
#endif

base::RepeatingClosure alternative_terminate_for_testing_;

base::WeakPtrFactory<GpuWatchdogThreadImplV1> weak_factory_;

DISALLOW_COPY_AND_ASSIGN(GpuWatchdogThreadImplV1);
Expand Down

0 comments on commit b92bd85

Please sign in to comment.