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

Unified Diff: media/midi/midi_manager_unittest.cc

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_mac_unittest.cc ('k') | media/midi/midi_manager_usb.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/midi_manager_unittest.cc
diff --git a/media/midi/midi_manager_unittest.cc b/media/midi/midi_manager_unittest.cc
index 6ae5defd5febfd7f6bd268dd12ec51be4c5935ba..9ab33ce7fc6de773e90775ab74382b11e0693e60 100644
--- a/media/midi/midi_manager_unittest.cc
+++ b/media/midi/midi_manager_unittest.cc
@@ -7,12 +7,12 @@
#include <stddef.h>
#include <stdint.h>
+#include <memory>
#include <vector>
#include "base/bind.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
@@ -161,16 +161,16 @@ class MidiManagerTest : public ::testing::Test {
}
protected:
- scoped_ptr<FakeMidiManager> manager_;
+ std::unique_ptr<FakeMidiManager> manager_;
private:
- scoped_ptr<base::MessageLoop> message_loop_;
+ std::unique_ptr<base::MessageLoop> message_loop_;
DISALLOW_COPY_AND_ASSIGN(MidiManagerTest);
};
TEST_F(MidiManagerTest, StartAndEndSession) {
- scoped_ptr<FakeMidiManagerClient> client;
+ std::unique_ptr<FakeMidiManagerClient> client;
client.reset(new FakeMidiManagerClient);
StartTheFirstSession(client.get());
@@ -180,7 +180,7 @@ TEST_F(MidiManagerTest, StartAndEndSession) {
}
TEST_F(MidiManagerTest, StartAndEndSessionWithError) {
- scoped_ptr<FakeMidiManagerClient> client;
+ std::unique_ptr<FakeMidiManagerClient> client;
client.reset(new FakeMidiManagerClient);
StartTheFirstSession(client.get());
@@ -190,9 +190,9 @@ TEST_F(MidiManagerTest, StartAndEndSessionWithError) {
}
TEST_F(MidiManagerTest, StartMultipleSessions) {
- scoped_ptr<FakeMidiManagerClient> client1;
- scoped_ptr<FakeMidiManagerClient> client2;
- scoped_ptr<FakeMidiManagerClient> client3;
+ std::unique_ptr<FakeMidiManagerClient> client1;
+ std::unique_ptr<FakeMidiManagerClient> client2;
+ std::unique_ptr<FakeMidiManagerClient> client3;
client1.reset(new FakeMidiManagerClient);
client2.reset(new FakeMidiManagerClient);
client3.reset(new FakeMidiManagerClient);
@@ -223,7 +223,7 @@ TEST_F(MidiManagerTest, TooManyPendingSessions) {
EXPECT_TRUE(manager_->start_initialization_is_called_);
// Push the last client that should be rejected for too many pending requests.
- scoped_ptr<FakeMidiManagerClient> additional_client(
+ std::unique_ptr<FakeMidiManagerClient> additional_client(
new FakeMidiManagerClient);
manager_->start_initialization_is_called_ = false;
manager_->StartSession(additional_client.get());
@@ -250,7 +250,7 @@ TEST_F(MidiManagerTest, TooManyPendingSessions) {
TEST_F(MidiManagerTest, AbortSession) {
// A client starting a session can be destructed while an asynchronous
// initialization is performed.
- scoped_ptr<FakeMidiManagerClient> client;
+ std::unique_ptr<FakeMidiManagerClient> client;
client.reset(new FakeMidiManagerClient);
StartTheFirstSession(client.get());
@@ -267,10 +267,10 @@ TEST_F(MidiManagerTest, CreateMidiManager) {
// SystemMonitor is needed on Windows.
base::SystemMonitor system_monitor;
- scoped_ptr<FakeMidiManagerClient> client;
+ std::unique_ptr<FakeMidiManagerClient> client;
client.reset(new FakeMidiManagerClient);
- scoped_ptr<MidiManager> manager(MidiManager::Create());
+ std::unique_ptr<MidiManager> manager(MidiManager::Create());
manager->StartSession(client.get());
Result result = client->WaitForResult();
« no previous file with comments | « media/midi/midi_manager_mac_unittest.cc ('k') | media/midi/midi_manager_usb.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698