Index: components/renderer_context_menu/context_menu_delegate.cc |
diff --git a/components/renderer_context_menu/context_menu_delegate.cc b/components/renderer_context_menu/context_menu_delegate.cc |
index e9fbd97e4887b3a7515b3874a5940b8ceb4286ef..07f74f2358da7a2956343d03a4fca5453df02b2a 100644 |
--- a/components/renderer_context_menu/context_menu_delegate.cc |
+++ b/components/renderer_context_menu/context_menu_delegate.cc |
@@ -4,6 +4,7 @@ |
#include "components/renderer_context_menu/context_menu_delegate.h" |
+#include "base/memory/ptr_util.h" |
#include "content/public/browser/web_contents.h" |
namespace { |
@@ -24,8 +25,9 @@ class ContextMenuDelegateUserData : public base::SupportsUserData::Data { |
} // namespace |
ContextMenuDelegate::ContextMenuDelegate(content::WebContents* web_contents) { |
- web_contents->SetUserData(&kMenuDelegateUserDataKey, |
- new ContextMenuDelegateUserData(this)); |
+ web_contents->SetUserData( |
+ &kMenuDelegateUserDataKey, |
+ base::MakeUnique<ContextMenuDelegateUserData>(this)); |
} |
ContextMenuDelegate::~ContextMenuDelegate() { |