diff options
author | kkimlabs@chromium.org <kkimlabs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-14 08:07:36 +0000 |
---|---|---|
committer | kkimlabs@chromium.org <kkimlabs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-14 08:07:36 +0000 |
commit | 545d7e9191a507c65f2e50f2fd190c528a06ec1b (patch) | |
tree | 33937d9701db39acf7d84b0bb63165326f7d295f /components/enhanced_bookmarks/image_store_unittest.cc | |
parent | 90de51b8ae488d888e615ad8d2eef271c200cd38 (diff) | |
download | chromium_src-545d7e9191a507c65f2e50f2fd190c528a06ec1b.zip chromium_src-545d7e9191a507c65f2e50f2fd190c528a06ec1b.tar.gz chromium_src-545d7e9191a507c65f2e50f2fd190c528a06ec1b.tar.bz2 |
Remove RefCounted from ImageStore class.
We won't be using scoped_refptr<ImageStore> so remove the unnecessary RefCounted.
BUG=68988
Review URL: https://codereview.chromium.org/283843002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/enhanced_bookmarks/image_store_unittest.cc')
-rw-r--r-- | components/enhanced_bookmarks/image_store_unittest.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/components/enhanced_bookmarks/image_store_unittest.cc b/components/enhanced_bookmarks/image_store_unittest.cc index 796526f..778c1e3 100644 --- a/components/enhanced_bookmarks/image_store_unittest.cc +++ b/components/enhanced_bookmarks/image_store_unittest.cc @@ -58,18 +58,18 @@ bool CompareImages(const gfx::Image& image_1, const gfx::Image& image_2) { // Factory functions for creating instances of the implementations. template <class T> -scoped_refptr<ImageStore> CreateStore(base::ScopedTempDir& folder); +ImageStore* CreateStore(base::ScopedTempDir& folder); template <> -scoped_refptr<ImageStore> CreateStore<TestImageStore>( +ImageStore* CreateStore<TestImageStore>( base::ScopedTempDir& folder) { - return scoped_refptr<ImageStore>(new TestImageStore()); + return new TestImageStore(); } template <> -scoped_refptr<ImageStore> CreateStore<PersistentImageStore>( +ImageStore* CreateStore<PersistentImageStore>( base::ScopedTempDir& folder) { - return scoped_refptr<ImageStore>(new PersistentImageStore(folder.path())); + return new PersistentImageStore(folder.path()); } // Methods to check if persistence is on or not. @@ -87,7 +87,7 @@ class ImageStoreUnitTest : public PlatformTest { virtual void SetUp() OVERRIDE { bool success = tempDir_.CreateUniqueTempDir(); ASSERT_TRUE(success); - store_ = CreateStore<T>(tempDir_); + store_.reset(CreateStore<T>(tempDir_)); } virtual void TearDown() OVERRIDE { @@ -96,12 +96,12 @@ class ImageStoreUnitTest : public PlatformTest { } bool use_persistent_store() const { return ShouldPersist<T>(); } - void ResetStore() { store_ = CreateStore<T>(tempDir_); } + void ResetStore() { store_.reset(CreateStore<T>(tempDir_)); } // The directory the database is saved into. base::ScopedTempDir tempDir_; // The object the fixture is testing, via its base interface. - scoped_refptr<ImageStore> store_; + scoped_ptr<ImageStore> store_; private: DISALLOW_COPY_AND_ASSIGN(ImageStoreUnitTest); |