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

Unified Diff: base/supports_user_data_unittest.cc

Issue 2680403004: Update SupportsUserData API to accept std::unique_ptr<>. (Closed)
Patch Set: Add TODO. Created 3 years, 10 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 | « base/supports_user_data.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/supports_user_data_unittest.cc
diff --git a/base/supports_user_data_unittest.cc b/base/supports_user_data_unittest.cc
index faa814091cb4d1f4c91a2e25598739e9687db673..959e5a418041739796c4a167f57fd130363b95a8 100644
--- a/base/supports_user_data_unittest.cc
+++ b/base/supports_user_data_unittest.cc
@@ -6,6 +6,7 @@
#include <vector>
+#include "base/memory/ptr_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
@@ -30,8 +31,8 @@ struct UsesItself : public SupportsUserData::Data {
TEST(SupportsUserDataTest, ClearWorksRecursively) {
TestSupportsUserData supports_user_data;
char key = 0;
- supports_user_data.SetUserData(&key,
- new UsesItself(&supports_user_data, &key));
+ supports_user_data.SetUserData(
+ &key, base::MakeUnique<UsesItself>(&supports_user_data, &key));
// Destruction of supports_user_data runs the actual test.
}
« no previous file with comments | « base/supports_user_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698