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

Unified Diff: base/memory/discardable_memory_mac.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_mac.cc
diff --git a/base/memory/discardable_memory_mac.cc b/base/memory/discardable_memory_mac.cc
index 01194ec8d785763aa0b61715a58f1b442d8e8a06..0bdc9eed1175bd9ed9089942e53dc4e7068239df 100644
--- a/base/memory/discardable_memory_mac.cc
+++ b/base/memory/discardable_memory_mac.cc
@@ -176,26 +176,26 @@ scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType(
case DISCARDABLE_MEMORY_TYPE_MAC: {
scoped_ptr<DiscardableMemoryMac> memory(new DiscardableMemoryMac(size));
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_ASHMEM:
NOTREACHED();
- return scoped_ptr<DiscardableMemory>();
+ return nullptr;
}
NOTREACHED();
- return scoped_ptr<DiscardableMemory>();
+ return nullptr;
}
// static

Powered by Google App Engine
This is Rietveld 408576698