| Index: device/wake_lock/wake_lock_for_testing.cc
|
| diff --git a/device/wake_lock/wake_lock_service_impl_for_testing.cc b/device/wake_lock/wake_lock_for_testing.cc
|
| similarity index 50%
|
| rename from device/wake_lock/wake_lock_service_impl_for_testing.cc
|
| rename to device/wake_lock/wake_lock_for_testing.cc
|
| index 6dcd921d5e421303e3a4cf989486924bacf533fe..0e737d577f6c0f2f9a950a802638adddf070e0a0 100644
|
| --- a/device/wake_lock/wake_lock_service_impl_for_testing.cc
|
| +++ b/device/wake_lock/wake_lock_for_testing.cc
|
| @@ -1,38 +1,38 @@
|
| -// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "device/wake_lock/wake_lock_service_impl_for_testing.h"
|
| +#include "device/wake_lock/wake_lock_for_testing.h"
|
|
|
| #include <utility>
|
|
|
| namespace device {
|
|
|
| -WakeLockServiceImplForTesting::WakeLockServiceImplForTesting(
|
| - mojom::WakeLockServiceRequest request,
|
| +WakeLockForTesting::WakeLockForTesting(
|
| + mojom::WakeLockRequest request,
|
| mojom::WakeLockType type,
|
| mojom::WakeLockReason reason,
|
| const std::string& description,
|
| int context_id,
|
| WakeLockContextCallback native_view_getter,
|
| scoped_refptr<base::SingleThreadTaskRunner> file_task_runner)
|
| - : WakeLockServiceImpl(std::move(request),
|
| - type,
|
| - reason,
|
| - description,
|
| - context_id,
|
| - native_view_getter,
|
| - file_task_runner),
|
| + : WakeLock(std::move(request),
|
| + type,
|
| + reason,
|
| + description,
|
| + context_id,
|
| + native_view_getter,
|
| + file_task_runner),
|
| has_wake_lock_(false) {}
|
|
|
| -WakeLockServiceImplForTesting::~WakeLockServiceImplForTesting() {}
|
| +WakeLockForTesting::~WakeLockForTesting() {}
|
|
|
| -void WakeLockServiceImplForTesting::HasWakeLockForTests(
|
| +void WakeLockForTesting::HasWakeLockForTests(
|
| HasWakeLockForTestsCallback callback) {
|
| std::move(callback).Run(has_wake_lock_);
|
| }
|
|
|
| -void WakeLockServiceImplForTesting::UpdateWakeLock() {
|
| +void WakeLockForTesting::UpdateWakeLock() {
|
| DCHECK(num_lock_requests_ >= 0);
|
|
|
| if (num_lock_requests_) {
|
| @@ -44,12 +44,12 @@ void WakeLockServiceImplForTesting::UpdateWakeLock() {
|
| }
|
| }
|
|
|
| -void WakeLockServiceImplForTesting::CreateWakeLock() {
|
| +void WakeLockForTesting::CreateWakeLock() {
|
| DCHECK(!has_wake_lock_);
|
| has_wake_lock_ = true;
|
| }
|
|
|
| -void WakeLockServiceImplForTesting::RemoveWakeLock() {
|
| +void WakeLockForTesting::RemoveWakeLock() {
|
| DCHECK(has_wake_lock_);
|
| has_wake_lock_ = false;
|
| }
|
|
|