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

Unified Diff: content/browser/websockets/websocket_manager.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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/web_contents_user_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/websockets/websocket_manager.cc
diff --git a/content/browser/websockets/websocket_manager.cc b/content/browser/websockets/websocket_manager.cc
index 9d2c4a79b13b21088fd77aa95cb691a838eacc6e..8f40b371e757c12fcc26ecfc39073a2ae74818dc 100644
--- a/content/browser/websockets/websocket_manager.cc
+++ b/content/browser/websockets/websocket_manager.cc
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/numerics/safe_conversions.h"
#include "base/rand_util.h"
#include "content/public/browser/browser_thread.h"
@@ -69,7 +70,7 @@ void WebSocketManager::CreateWebSocket(int process_id, int frame_id,
if (!handle) {
handle = new Handle(
new WebSocketManager(process_id, host->GetStoragePartition()));
- host->SetUserData(kWebSocketManagerKeyName, handle);
+ host->SetUserData(kWebSocketManagerKeyName, base::WrapUnique(handle));
host->AddObserver(handle);
} else {
DCHECK(handle->manager());
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/web_contents_user_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698