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

Unified Diff: content/browser/loader/resource_scheduler.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_scheduler.cc
diff --git a/content/browser/loader/resource_scheduler.cc b/content/browser/loader/resource_scheduler.cc
index e1dcb0aa04ae1c3f52ee34e4c4ee2f09ced62df1..bd6df1fcd6aed3977fb284ad53bbde3b91d572ee 100644
--- a/content/browser/loader/resource_scheduler.cc
+++ b/content/browser/loader/resource_scheduler.cc
@@ -5,6 +5,7 @@
#include "content/browser/loader/resource_scheduler.h"
#include <stdint.h>
+
#include <set>
#include <string>
#include <utility>
@@ -12,6 +13,7 @@
#include "base/feature_list.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_macros.h"
@@ -228,7 +230,7 @@ class ResourceScheduler::ScheduledResourceRequest : public ResourceThrottle {
host_port_pair_(net::HostPortPair::FromURL(request->url())),
weak_ptr_factory_(this) {
DCHECK(!request_->GetUserData(kUserDataKey));
- request_->SetUserData(kUserDataKey, new UnownedPointer(this));
+ request_->SetUserData(kUserDataKey, base::MakeUnique<UnownedPointer>(this));
}
~ScheduledResourceRequest() override {

Powered by Google App Engine
This is Rietveld 408576698