Apply modernize-make-unique to remaining files
This intends to cover directories and individual files where changes
weren't large enough to warrant splitting out to a separate change.
This is a large-scale change: go/chromium-modernize-make-unique
Bug: 1194272
Change-Id: Ia50424ec4b7f998e65dee5071926332ffcce7a94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2803041
Commit-Queue: Peter Boström <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Owners-Override: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#869273}
diff --git a/ppapi/proxy/audio_input_resource.cc b/ppapi/proxy/audio_input_resource.cc
index d91a2018..40aa644 100644
--- a/ppapi/proxy/audio_input_resource.cc
+++ b/ppapi/proxy/audio_input_resource.cc
@@ -4,6 +4,7 @@
#include "ppapi/proxy/audio_input_resource.h"
+#include <memory>
#include <string>
#include "base/bind.h"
@@ -183,7 +184,7 @@
void AudioInputResource::SetStreamInfo(
base::ReadOnlySharedMemoryRegion shared_memory_region,
base::SyncSocket::Handle socket_handle) {
- socket_.reset(new base::CancelableSyncSocket(socket_handle));
+ socket_ = std::make_unique<base::CancelableSyncSocket>(socket_handle);
DCHECK(!shared_memory_mapping_.IsValid());
// Ensure that the allocated memory is enough for the audio bus and buffer
@@ -232,8 +233,8 @@
return;
}
DCHECK(!audio_input_thread_.get());
- audio_input_thread_.reset(new base::DelegateSimpleThread(
- this, "plugin_audio_input_thread"));
+ audio_input_thread_ = std::make_unique<base::DelegateSimpleThread>(
+ this, "plugin_audio_input_thread");
audio_input_thread_->Start();
}