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

Unified Diff: net/url_request/report_sender.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: net/url_request/report_sender.cc
diff --git a/net/url_request/report_sender.cc b/net/url_request/report_sender.cc
index 96263d7f2b4ea4b1f87e98508e4723613cd3b0dc..ef560151d01f26473698a5c536c4808977316d3d 100644
--- a/net/url_request/report_sender.cc
+++ b/net/url_request/report_sender.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "base/memory/ptr_util.h"
#include "net/base/elements_upload_data_stream.h"
#include "net/base/load_flags.h"
#include "net/base/request_priority.h"
@@ -55,8 +56,9 @@ void ReportSender::Send(const GURL& report_uri,
DCHECK(!content_type.empty());
std::unique_ptr<URLRequest> url_request =
request_context_->CreateRequest(report_uri, DEFAULT_PRIORITY, this);
- url_request->SetUserData(&kUserDataKey,
- new CallbackInfo(success_callback, error_callback));
+ url_request->SetUserData(
+ &kUserDataKey,
+ base::MakeUnique<CallbackInfo>(success_callback, error_callback));
int load_flags =
LOAD_BYPASS_CACHE | LOAD_DISABLE_CACHE | LOAD_DO_NOT_SEND_AUTH_DATA;

Powered by Google App Engine
This is Rietveld 408576698