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

Unified Diff: chrome/browser/ui/views/tab_dialogs_views.cc

Issue 2847173004: Switch SupportsUserData uses to use unique_ptr. (Closed)
Patch Set: 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
Index: chrome/browser/ui/views/tab_dialogs_views.cc
diff --git a/chrome/browser/ui/views/tab_dialogs_views.cc b/chrome/browser/ui/views/tab_dialogs_views.cc
index fa36944f43e123d74f8fe6640d9ea9dc15e15284..f600859c0790a9ffc9b3f01fe6d825c8fcaa3d1f 100644
--- a/chrome/browser/ui/views/tab_dialogs_views.cc
+++ b/chrome/browser/ui/views/tab_dialogs_views.cc
@@ -19,8 +19,10 @@
// static
void TabDialogs::CreateForWebContents(content::WebContents* contents) {
DCHECK(contents);
- if (!FromWebContents(contents))
- contents->SetUserData(UserDataKey(), new TabDialogsViews(contents));
+ if (!FromWebContents(contents)) {
+ contents->SetUserData(UserDataKey(),
+ base::MakeUnique<TabDialogsViews>(contents));
+ }
}
TabDialogsViews::TabDialogsViews(content::WebContents* contents)

Powered by Google App Engine
This is Rietveld 408576698