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

Unified Diff: chrome/browser/chrome_content_browser_client.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/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index c31ae0acb3c80c5cbf7ce16e0993dc5f97b93e27..addbf5984a52545740c4f9952fcc63ec25586161 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1215,9 +1215,10 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
new WebRtcLoggingHandlerHost(id, profile,
g_browser_process->webrtc_log_uploader());
host->AddFilter(webrtc_logging_handler_host);
- host->SetUserData(WebRtcLoggingHandlerHost::kWebRtcLoggingHandlerHostKey,
- new base::UserDataAdapter<WebRtcLoggingHandlerHost>(
- webrtc_logging_handler_host));
+ host->SetUserData(
+ WebRtcLoggingHandlerHost::kWebRtcLoggingHandlerHostKey,
+ base::MakeUnique<base::UserDataAdapter<WebRtcLoggingHandlerHost>>(
+ webrtc_logging_handler_host));
// The audio manager outlives the host, so it's safe to hand a raw pointer to
// it to the AudioDebugRecordingsHandler, which is owned by the host.
@@ -1225,7 +1226,7 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
new AudioDebugRecordingsHandler(profile, media::AudioManager::Get());
host->SetUserData(
AudioDebugRecordingsHandler::kAudioDebugRecordingsHandlerKey,
- new base::UserDataAdapter<AudioDebugRecordingsHandler>(
+ base::MakeUnique<base::UserDataAdapter<AudioDebugRecordingsHandler>>(
audio_debug_recordings_handler));
#endif

Powered by Google App Engine
This is Rietveld 408576698