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

Unified Diff: cc/test/test_shared_bitmap_manager.cc

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning Created 6 years, 3 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
« no previous file with comments | « cc/test/render_pass_test_utils.cc ('k') | cc/test/test_web_graphics_context_3d.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_shared_bitmap_manager.cc
diff --git a/cc/test/test_shared_bitmap_manager.cc b/cc/test/test_shared_bitmap_manager.cc
index e985572ed9cf2237924bf35c8444f42fbe91b3d3..d7716ddcba855508456197509ebac421c855dfa1 100644
--- a/cc/test/test_shared_bitmap_manager.cc
+++ b/cc/test/test_shared_bitmap_manager.cc
@@ -25,7 +25,7 @@ scoped_ptr<SharedBitmap> TestSharedBitmapManager::AllocateSharedBitmap(
memory->CreateAndMapAnonymous(size.GetArea() * 4);
SharedBitmapId id = SharedBitmap::GenerateId();
bitmap_map_[id] = memory.get();
- return scoped_ptr<SharedBitmap>(
+ return make_scoped_ptr(
new SharedBitmap(memory.release(), id, base::Bind(&FreeSharedBitmap)));
}
@@ -34,8 +34,8 @@ scoped_ptr<SharedBitmap> TestSharedBitmapManager::GetSharedBitmapFromId(
const SharedBitmapId& id) {
base::AutoLock lock(lock_);
if (bitmap_map_.find(id) == bitmap_map_.end())
- return scoped_ptr<SharedBitmap>();
- return scoped_ptr<SharedBitmap>(
+ return nullptr;
+ return make_scoped_ptr(
new SharedBitmap(bitmap_map_[id], id, base::Bind(&IgnoreSharedBitmap)));
}
@@ -44,7 +44,7 @@ scoped_ptr<SharedBitmap> TestSharedBitmapManager::GetBitmapForSharedMemory(
base::AutoLock lock(lock_);
SharedBitmapId id = SharedBitmap::GenerateId();
bitmap_map_[id] = memory;
- return scoped_ptr<SharedBitmap>(
+ return make_scoped_ptr(
new SharedBitmap(memory, id, base::Bind(&IgnoreSharedBitmap)));
}
« no previous file with comments | « cc/test/render_pass_test_utils.cc ('k') | cc/test/test_web_graphics_context_3d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698