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

Unified Diff: components/renderer_context_menu/context_menu_delegate.cc

Issue 2842833003: Update SupportsUserData uses with unique_ptr. (Closed)
Patch Set: rebase Created 3 years, 8 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 | « components/pdf/browser/pdf_web_contents_helper.cc ('k') | components/safe_browsing/base_ui_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « components/pdf/browser/pdf_web_contents_helper.cc ('k') | components/safe_browsing/base_ui_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698