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

Unified Diff: content/browser/service_worker/service_worker_response_info.cc

Issue 2815913005: Switch to using scoped_ptr with UserData (Closed)
Patch Set: fixes 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/service_worker/service_worker_response_info.cc
diff --git a/content/browser/service_worker/service_worker_response_info.cc b/content/browser/service_worker/service_worker_response_info.cc
index bc401803375add9154fbda0e8b3bd02532328f5b..e9b3f63a52e0824daafeedf3f61ea0c5a8ebda04 100644
--- a/content/browser/service_worker/service_worker_response_info.cc
+++ b/content/browser/service_worker/service_worker_response_info.cc
@@ -4,6 +4,7 @@
#include "content/browser/service_worker/service_worker_response_info.h"
+#include "base/memory/ptr_util.h"
#include "content/public/common/resource_response_info.h"
#include "net/url_request/url_request.h"
@@ -23,7 +24,7 @@ ServiceWorkerResponseInfo* ServiceWorkerResponseInfo::ForRequest(
request->GetUserData(&kUserDataKey));
if (!info && create) {
info = new ServiceWorkerResponseInfo();
- request->SetUserData(&kUserDataKey, info);
+ request->SetUserData(&kUserDataKey, base::WrapUnique(info));
}
return info;
}

Powered by Google App Engine
This is Rietveld 408576698