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

Unified Diff: components/pdf/browser/pdf_web_contents_helper.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
Index: components/pdf/browser/pdf_web_contents_helper.cc
diff --git a/components/pdf/browser/pdf_web_contents_helper.cc b/components/pdf/browser/pdf_web_contents_helper.cc
index fdbea015a2059615c76d9ae627f17acd9e78a6b8..64b814bfe29419105ea9f0e53460cd7016b88c8c 100644
--- a/components/pdf/browser/pdf_web_contents_helper.cc
+++ b/components/pdf/browser/pdf_web_contents_helper.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "components/pdf/browser/pdf_web_contents_helper_client.h"
@@ -20,8 +21,9 @@ void PDFWebContentsHelper::CreateForWebContentsWithClient(
std::unique_ptr<PDFWebContentsHelperClient> client) {
if (FromWebContents(contents))
return;
- contents->SetUserData(UserDataKey(),
- new PDFWebContentsHelper(contents, std::move(client)));
+ contents->SetUserData(
+ UserDataKey(),
+ base::WrapUnique(new PDFWebContentsHelper(contents, std::move(client))));
}
PDFWebContentsHelper::PDFWebContentsHelper(
« no previous file with comments | « components/pdf/browser/pdf_web_contents_helper.h ('k') | components/renderer_context_menu/context_menu_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698