Index: components/user_prefs/user_prefs.cc |
diff --git a/components/user_prefs/user_prefs.cc b/components/user_prefs/user_prefs.cc |
index 493c50eac77d10e846f80a779bf55bbb39cdf36a..a752c8f8acc56d46895d857a37a2b785147d4088 100644 |
--- a/components/user_prefs/user_prefs.cc |
+++ b/components/user_prefs/user_prefs.cc |
@@ -5,6 +5,7 @@ |
#include "components/user_prefs/user_prefs.h" |
#include "base/logging.h" |
+#include "base/memory/ptr_util.h" |
#include "base/memory/singleton.h" |
#include "components/prefs/pref_service.h" |
@@ -34,7 +35,7 @@ void UserPrefs::Set(base::SupportsUserData* context, PrefService* prefs) { |
DCHECK(context); |
DCHECK(prefs); |
DCHECK(!context->GetUserData(UserDataKey())); |
- context->SetUserData(UserDataKey(), new UserPrefs(prefs)); |
+ context->SetUserData(UserDataKey(), base::WrapUnique(new UserPrefs(prefs))); |
} |
UserPrefs::UserPrefs(PrefService* prefs) : prefs_(prefs) { |