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

Unified Diff: base/memory/discardable_memory_linux.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_linux.cc
diff --git a/base/memory/discardable_memory_linux.cc b/base/memory/discardable_memory_linux.cc
index f4aade3c602f574001e0383fa75093de81262f27..81ae19d746732f908f57954526d369811ef8b1b1 100644
--- a/base/memory/discardable_memory_linux.cc
+++ b/base/memory/discardable_memory_linux.cc
@@ -31,19 +31,19 @@ scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType(
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:
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