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

Unified Diff: content/browser/resource_context_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/resource_context_impl.cc
diff --git a/content/browser/resource_context_impl.cc b/content/browser/resource_context_impl.cc
index 93e2890da81d964f684b88fa027a1b694723703c..75302eeca25104a74f56b293c9088eeae7d94d0e 100644
--- a/content/browser/resource_context_impl.cc
+++ b/content/browser/resource_context_impl.cc
@@ -68,7 +68,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));
@@ -79,13 +79,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();
}

Powered by Google App Engine
This is Rietveld 408576698