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

Unified Diff: webrtc/media/devices/linuxdevicemanager.cc

Issue 1728503002: Replace scoped_ptr with unique_ptr in webrtc/media/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@up1
Patch Set: Created 4 years, 10 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 | « webrtc/media/devices/linuxdeviceinfo.cc ('k') | webrtc/media/devices/macdevicemanager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/devices/linuxdevicemanager.cc
diff --git a/webrtc/media/devices/linuxdevicemanager.cc b/webrtc/media/devices/linuxdevicemanager.cc
index 9122d6fe0035c2812e443b83b930e759ea0205ac..2b218c00161dc0b06e73a46099e3c47ebbbb61d3 100644
--- a/webrtc/media/devices/linuxdevicemanager.cc
+++ b/webrtc/media/devices/linuxdevicemanager.cc
@@ -11,6 +11,9 @@
#include "webrtc/media/devices/linuxdevicemanager.h"
#include <unistd.h>
+
+#include <memory>
+
#include "webrtc/base/fileutils.h"
#include "webrtc/base/linux.h"
#include "webrtc/base/logging.h"
@@ -118,7 +121,7 @@ enum MetaType { M2_4, M2_6, NONE };
static void ScanDeviceDirectory(const std::string& devdir,
std::vector<Device>* devices) {
- rtc::scoped_ptr<rtc::DirectoryIterator> directoryIterator(
+ std::unique_ptr<rtc::DirectoryIterator> directoryIterator(
rtc::Filesystem::IterateDirectory());
if (directoryIterator->Iterate(rtc::Pathname(devdir))) {
@@ -138,7 +141,7 @@ static void ScanDeviceDirectory(const std::string& devdir,
static std::string GetVideoDeviceNameK2_6(const std::string& device_meta_path) {
std::string device_name;
- rtc::scoped_ptr<rtc::FileStream> device_meta_stream(
+ std::unique_ptr<rtc::FileStream> device_meta_stream(
rtc::Filesystem::OpenFile(device_meta_path, "r"));
if (device_meta_stream) {
@@ -227,7 +230,7 @@ static void ScanV4L2Devices(std::vector<Device>* devices) {
MetaType meta;
std::string metadata_dir;
- rtc::scoped_ptr<rtc::DirectoryIterator> directoryIterator(
+ std::unique_ptr<rtc::DirectoryIterator> directoryIterator(
rtc::Filesystem::IterateDirectory());
// Try and guess kernel version
« no previous file with comments | « webrtc/media/devices/linuxdeviceinfo.cc ('k') | webrtc/media/devices/macdevicemanager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698