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

Unified Diff: content/browser/loader/resource_request_info_impl.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/loader/resource_request_info_impl.cc
diff --git a/content/browser/loader/resource_request_info_impl.cc b/content/browser/loader/resource_request_info_impl.cc
index 141c3baed528d010ef779a381b8d1b4b31406996..802b404f033f74da1c5bacba704919414b0a5551 100644
--- a/content/browser/loader/resource_request_info_impl.cc
+++ b/content/browser/loader/resource_request_info_impl.cc
@@ -307,13 +307,13 @@ NavigationUIData* ResourceRequestInfoImpl::GetNavigationUIData() const {
}
void ResourceRequestInfoImpl::AssociateWithRequest(net::URLRequest* request) {
- request->SetUserData(NULL, this);
+ request->SetUserData(NULL, base::WrapUnique(this));
int render_process_id;
int render_frame_id;
if (GetAssociatedRenderFrame(&render_process_id, &render_frame_id)) {
- request->SetUserData(
- URLRequestUserData::kUserDataKey,
- new URLRequestUserData(render_process_id, render_frame_id));
+ request->SetUserData(URLRequestUserData::kUserDataKey,
+ base::MakeUnique<URLRequestUserData>(render_process_id,
+ render_frame_id));
}
}

Powered by Google App Engine
This is Rietveld 408576698