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

Unified Diff: content/browser/webrtc/webrtc_internals.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 | « content/browser/webrtc/webrtc_internals.h ('k') | content/browser/webrtc/webrtc_internals_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webrtc/webrtc_internals.cc
diff --git a/content/browser/webrtc/webrtc_internals.cc b/content/browser/webrtc/webrtc_internals.cc
index 933d0a39f04301b83d75910c65b00700e13c739b..41317663ca98e283a0f90ba09006c0d89eb6d535 100644
--- a/content/browser/webrtc/webrtc_internals.cc
+++ b/content/browser/webrtc/webrtc_internals.cc
@@ -549,19 +549,18 @@ void WebRTCInternals::UpdateWakeLock() {
DVLOG(1)
<< ("Cancel the wake lock on application suspension since no "
"PeerConnections are active anymore.");
- GetWakeLockService()->CancelWakeLock();
+ GetWakeLock()->CancelWakeLock();
} else if (num_open_connections_ != 0) {
DVLOG(1) << ("Preventing the application from being suspended while one or "
"more PeerConnections are active.");
- GetWakeLockService()->RequestWakeLock();
+ GetWakeLock()->RequestWakeLock();
}
}
-device::mojom::WakeLockService* WebRTCInternals::GetWakeLockService() {
+device::mojom::WakeLock* WebRTCInternals::GetWakeLock() {
// Here is a lazy binding, and will not reconnect after connection error.
- if (!wake_lock_service_) {
- device::mojom::WakeLockServiceRequest request =
- mojo::MakeRequest(&wake_lock_service_);
+ if (!wake_lock_) {
+ device::mojom::WakeLockRequest request = mojo::MakeRequest(&wake_lock_);
// In some testing contexts, the service manager connection isn't
// initialized.
if (ServiceManagerConnection::GetForProcess()) {
@@ -577,7 +576,7 @@ device::mojom::WakeLockService* WebRTCInternals::GetWakeLockService() {
"WebRTC has active PeerConnections", std::move(request));
}
}
- return wake_lock_service_.get();
+ return wake_lock_.get();
}
void WebRTCInternals::ProcessPendingUpdates() {
« no previous file with comments | « content/browser/webrtc/webrtc_internals.h ('k') | content/browser/webrtc/webrtc_internals_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698