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

Unified Diff: device/hid/hid_service_unittest.cc

Issue 424623002: Fix memory leak in HidServiceTest.Create from r285774 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/hid/hid_service_unittest.cc
diff --git a/device/hid/hid_service_unittest.cc b/device/hid/hid_service_unittest.cc
index 7636e713c4ba0ee7713872c6e722989a2b302d47..a807579e74d44b0ca877fc910ee277a767852c62 100644
--- a/device/hid/hid_service_unittest.cc
+++ b/device/hid/hid_service_unittest.cc
@@ -4,6 +4,7 @@
#include <vector>
+#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "device/hid/hid_service.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -12,7 +13,8 @@ namespace device {
TEST(HidServiceTest, Create) {
base::MessageLoopForIO message_loop;
- HidService* service = HidService::Create(message_loop.message_loop_proxy());
+ scoped_ptr<HidService> service(
+ HidService::Create(message_loop.message_loop_proxy()));
ASSERT_TRUE(service);
std::vector<HidDeviceInfo> devices;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698