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

Unified Diff: chrome/browser/profiles/profile_android.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: chrome/browser/profiles/profile_android.cc
diff --git a/chrome/browser/profiles/profile_android.cc b/chrome/browser/profiles/profile_android.cc
index f141400c6f40434802a3c47061907add5febc451..3bb20c555a50246a213b8ba72b60bb91885aa940 100644
--- a/chrome/browser/profiles/profile_android.cc
+++ b/chrome/browser/profiles/profile_android.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/profiles/profile_android.h"
#include "base/android/jni_android.h"
+#include "base/memory/ptr_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_destroyer.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -27,7 +28,7 @@ ProfileAndroid* ProfileAndroid::FromProfile(Profile* profile) {
profile->GetUserData(kProfileAndroidKey));
if (!profile_android) {
profile_android = new ProfileAndroid(profile);
- profile->SetUserData(kProfileAndroidKey, profile_android);
+ profile->SetUserData(kProfileAndroidKey, base::WrapUnique(profile_android));
}
return profile_android;
}
« no previous file with comments | « chrome/browser/password_manager/password_manager_test_base.cc ('k') | chrome/browser/search/instant_io_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698