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

Unified Diff: media/midi/midi_manager_usb.h

Issue 1915443003: Replace scoped_ptr with std::unique_ptr in //media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptr-media-base
Patch Set: scopedptr-media: rebase Created 4 years, 8 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 | « media/midi/midi_manager_unittest.cc ('k') | media/midi/midi_manager_usb.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/midi_manager_usb.h
diff --git a/media/midi/midi_manager_usb.h b/media/midi/midi_manager_usb.h
index 12e8ed5e790d51a31b5005bf6f4ccaffabeaae25..a4b06a0374377822cfc03a427a52d85e44829d7c 100644
--- a/media/midi/midi_manager_usb.h
+++ b/media/midi/midi_manager_usb.h
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <memory>
#include <utility>
#include <vector>
@@ -16,7 +17,6 @@
#include "base/compiler_specific.h"
#include "base/containers/hash_tables.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "media/midi/midi_manager.h"
#include "media/midi/usb_midi_device.h"
@@ -36,7 +36,8 @@ class USB_MIDI_EXPORT MidiManagerUsb
public UsbMidiDeviceDelegate,
NON_EXPORTED_BASE(public UsbMidiInputStream::Delegate) {
public:
- explicit MidiManagerUsb(scoped_ptr<UsbMidiDevice::Factory> device_factory);
+ explicit MidiManagerUsb(
+ std::unique_ptr<UsbMidiDevice::Factory> device_factory);
~MidiManagerUsb() override;
// MidiManager implementation.
@@ -52,7 +53,7 @@ class USB_MIDI_EXPORT MidiManagerUsb
const uint8_t* data,
size_t size,
base::TimeTicks time) override;
- void OnDeviceAttached(scoped_ptr<UsbMidiDevice> device) override;
+ void OnDeviceAttached(std::unique_ptr<UsbMidiDevice> device) override;
void OnDeviceDetached(size_t index) override;
// UsbMidiInputStream::Delegate implementation.
@@ -79,17 +80,17 @@ class USB_MIDI_EXPORT MidiManagerUsb
void OnEnumerateDevicesDone(bool result, UsbMidiDevice::Devices* devices);
bool AddPorts(UsbMidiDevice* device, int device_id);
- scoped_ptr<UsbMidiDevice::Factory> device_factory_;
+ std::unique_ptr<UsbMidiDevice::Factory> device_factory_;
ScopedVector<UsbMidiDevice> devices_;
ScopedVector<UsbMidiOutputStream> output_streams_;
- scoped_ptr<UsbMidiInputStream> input_stream_;
+ std::unique_ptr<UsbMidiInputStream> input_stream_;
base::Callback<void(Result result)> initialize_callback_;
// A map from <endpoint_number, cable_number> to the index of input jacks.
base::hash_map<std::pair<int, int>, size_t> input_jack_dictionary_;
- scoped_ptr<MidiScheduler> scheduler_;
+ std::unique_ptr<MidiScheduler> scheduler_;
DISALLOW_COPY_AND_ASSIGN(MidiManagerUsb);
};
« no previous file with comments | « media/midi/midi_manager_unittest.cc ('k') | media/midi/midi_manager_usb.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698