diff options
author | reillyg <reillyg@chromium.org> | 2014-09-06 11:38:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-06 18:42:54 +0000 |
commit | ce69e2adaf3ec91056ec87e1a59848b9781709c1 (patch) | |
tree | cfc4d684d64bb18691639ba01d13d4da9cdd94ac /device/hid/hid_connection_unittest.cc | |
parent | 4e279527936c87f440663b15dd29a71771ac36a9 (diff) | |
download | chromium_src-ce69e2adaf3ec91056ec87e1a59848b9781709c1.zip chromium_src-ce69e2adaf3ec91056ec87e1a59848b9781709c1.tar.gz chromium_src-ce69e2adaf3ec91056ec87e1a59848b9781709c1.tar.bz2 |
Make the device::HidService destructor protected.
This prevents anything other than device::HidService::Destroyer from
calling the destructor. For example, scoped_ptr, as was the case in
HidConnectionTest.
BUG=
Review URL: https://codereview.chromium.org/542153004
Cr-Commit-Position: refs/heads/master@{#293623}
Diffstat (limited to 'device/hid/hid_connection_unittest.cc')
-rw-r--r-- | device/hid/hid_connection_unittest.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/device/hid/hid_connection_unittest.cc b/device/hid/hid_connection_unittest.cc index 064720f..5c67edf 100644 --- a/device/hid/hid_connection_unittest.cc +++ b/device/hid/hid_connection_unittest.cc @@ -73,8 +73,7 @@ class HidConnectionTest : public testing::Test { if (!UsbTestGadget::IsTestEnabled()) return; message_loop_.reset(new base::MessageLoopForIO()); - service_.reset(HidService::GetInstance( - message_loop_->message_loop_proxy())); + service_ = HidService::GetInstance(message_loop_->message_loop_proxy()); ASSERT_TRUE(service_); test_gadget_ = UsbTestGadget::Claim(); @@ -119,7 +118,7 @@ class HidConnectionTest : public testing::Test { } scoped_ptr<base::MessageLoopForIO> message_loop_; - scoped_ptr<HidService> service_; + HidService* service_; scoped_ptr<UsbTestGadget> test_gadget_; HidDeviceId device_id_; }; |