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

Unified Diff: content/browser/android/context_selection_client.cc

Issue 2853663002: Switch SupportsUserData uses to use unique_ptr. (Closed)
Patch Set: reparent 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: content/browser/android/context_selection_client.cc
diff --git a/content/browser/android/context_selection_client.cc b/content/browser/android/context_selection_client.cc
index d57b156c300728285f0888968fb8c733351255dd..c9316f24aab070aae80f469cf739f5cbebf39702 100644
--- a/content/browser/android/context_selection_client.cc
+++ b/content/browser/android/context_selection_client.cc
@@ -7,6 +7,7 @@
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "base/supports_user_data.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
@@ -53,7 +54,8 @@ ContextSelectionClient::ContextSelectionClient(
web_contents_(web_contents),
weak_ptr_factory_(this) {
DCHECK(!web_contents_->GetUserData(kContextSelectionClientUDKey));
- web_contents_->SetUserData(kContextSelectionClientUDKey, new UserData(this));
+ web_contents_->SetUserData(kContextSelectionClientUDKey,
+ base::MakeUnique<UserData>(this));
}
ContextSelectionClient::~ContextSelectionClient() {

Powered by Google App Engine
This is Rietveld 408576698