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

Unified Diff: base/memory/discardable_memory_android.cc

Issue 655003004: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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: base/memory/discardable_memory_android.cc
diff --git a/base/memory/discardable_memory_android.cc b/base/memory/discardable_memory_android.cc
index 7dd8df71dc736d9e5dd5f3d5f9732d34b6020fea..b1258c2e7554f5885684fb17ba3d4f0166a089a2 100644
--- a/base/memory/discardable_memory_android.cc
+++ b/base/memory/discardable_memory_android.cc
@@ -67,26 +67,26 @@ scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType(
new internal::DiscardableMemoryAshmem(
size, &shared_state->allocator, &shared_state->manager));
if (!memory->Initialize())
- return scoped_ptr<DiscardableMemory>();
+ return nullptr;
- return memory.PassAs<DiscardableMemory>();
+ return memory.Pass();
}
case DISCARDABLE_MEMORY_TYPE_EMULATED: {
scoped_ptr<internal::DiscardableMemoryEmulated> memory(
new internal::DiscardableMemoryEmulated(size));
if (!memory->Initialize())
- return scoped_ptr<DiscardableMemory>();
+ return nullptr;
- return memory.PassAs<DiscardableMemory>();
+ return memory.Pass();
}
case DISCARDABLE_MEMORY_TYPE_NONE:
case DISCARDABLE_MEMORY_TYPE_MAC:
NOTREACHED();
- return scoped_ptr<DiscardableMemory>();
+ return nullptr;
}
NOTREACHED();
- return scoped_ptr<DiscardableMemory>();
+ return nullptr;
}
// static

Powered by Google App Engine
This is Rietveld 408576698