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

Unified Diff: device/usb/usb_service_unittest.cc

Issue 1874313002: Convert device to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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 | « device/usb/usb_service_impl.cc ('k') | device/usb/webusb_descriptors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_service_unittest.cc
diff --git a/device/usb/usb_service_unittest.cc b/device/usb/usb_service_unittest.cc
index 1ee013c65fb00994ec595705d5e5697a5c75bc02..6482c9ae695e6b57e1b8319cc23b2e2fc94d796d 100644
--- a/device/usb/usb_service_unittest.cc
+++ b/device/usb/usb_service_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <memory>
+
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/test_io_thread.h"
@@ -24,15 +26,15 @@ class UsbServiceTest : public ::testing::Test {
}
protected:
- scoped_ptr<base::MessageLoop> message_loop_;
- scoped_ptr<base::TestIOThread> io_thread_;
- scoped_ptr<TestDeviceClient> device_client_;
+ std::unique_ptr<base::MessageLoop> message_loop_;
+ std::unique_ptr<base::TestIOThread> io_thread_;
+ std::unique_ptr<TestDeviceClient> device_client_;
};
TEST_F(UsbServiceTest, ClaimGadget) {
if (!UsbTestGadget::IsTestEnabled()) return;
- scoped_ptr<UsbTestGadget> gadget =
+ std::unique_ptr<UsbTestGadget> gadget =
UsbTestGadget::Claim(io_thread_->task_runner());
ASSERT_TRUE(gadget.get());
@@ -45,7 +47,7 @@ TEST_F(UsbServiceTest, ClaimGadget) {
TEST_F(UsbServiceTest, DisconnectAndReconnect) {
if (!UsbTestGadget::IsTestEnabled()) return;
- scoped_ptr<UsbTestGadget> gadget =
+ std::unique_ptr<UsbTestGadget> gadget =
UsbTestGadget::Claim(io_thread_->task_runner());
ASSERT_TRUE(gadget.get());
ASSERT_TRUE(gadget->Disconnect());
« no previous file with comments | « device/usb/usb_service_impl.cc ('k') | device/usb/webusb_descriptors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698