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

Unified Diff: content/browser/resource_context_impl.cc

Issue 2815913005: Switch to using scoped_ptr with UserData (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
Index: content/browser/resource_context_impl.cc
diff --git a/content/browser/resource_context_impl.cc b/content/browser/resource_context_impl.cc
index a9718edb06d980fe36b493846cefa9c18e69de74..141a08305332b3d9f2e33b1041c337836c4440b9 100644
--- a/content/browser/resource_context_impl.cc
+++ b/content/browser/resource_context_impl.cc
@@ -52,7 +52,7 @@ URLDataManagerBackend* GetURLDataManagerForResourceContext(
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!context->GetUserData(kURLDataManagerBackendKeyName)) {
context->SetUserData(kURLDataManagerBackendKeyName,
- new URLDataManagerBackend());
+ base::MakeUnique<URLDataManagerBackend>());
}
return static_cast<URLDataManagerBackend*>(
context->GetUserData(kURLDataManagerBackendKeyName));
@@ -63,13 +63,12 @@ void InitializeResourceContext(BrowserContext* browser_context) {
resource_context->SetUserData(
kBlobStorageContextKeyName,
- new UserDataAdapter<ChromeBlobStorageContext>(
+ base::MakeUnique<UserDataAdapter<ChromeBlobStorageContext>>(
ChromeBlobStorageContext::GetFor(browser_context)));
resource_context->SetUserData(
- kStreamContextKeyName,
- new UserDataAdapter<StreamContext>(
- StreamContext::GetFor(browser_context)));
+ kStreamContextKeyName, base::MakeUnique<UserDataAdapter<StreamContext>>(
+ StreamContext::GetFor(browser_context)));
resource_context->DetachFromSequence();
}
« no previous file with comments | « content/browser/loader/resource_scheduler.cc ('k') | content/browser/service_worker/foreign_fetch_request_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698