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

Unified Diff: device/wake_lock/wake_lock_for_testing.cc

Issue 2921823002: Rationalize WakeLock naming conventions (Closed)
Patch Set: rebase Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/wake_lock/wake_lock_for_testing.h ('k') | device/wake_lock/wake_lock_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « device/wake_lock/wake_lock_for_testing.h ('k') | device/wake_lock/wake_lock_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698