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

Unified Diff: chrome/browser/nacl_host/pnacl_translation_cache_unittest.cc

Issue 28933003: Delete PNaCl translation cache backend object when no longer needed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add dcheck Created 7 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
« no previous file with comments | « chrome/browser/nacl_host/pnacl_translation_cache.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/nacl_host/pnacl_translation_cache_unittest.cc
diff --git a/chrome/browser/nacl_host/pnacl_translation_cache_unittest.cc b/chrome/browser/nacl_host/pnacl_translation_cache_unittest.cc
index df98b3d3ec877b54fa9c6f38689c45ae165cb640..adcdd35b5db8656d1d07a637380d3077e0488049 100644
--- a/chrome/browser/nacl_host/pnacl_translation_cache_unittest.cc
+++ b/chrome/browser/nacl_host/pnacl_translation_cache_unittest.cc
@@ -27,7 +27,7 @@ class PnaclTranslationCacheTest : public testing::Test {
PnaclTranslationCacheTest()
: thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
virtual ~PnaclTranslationCacheTest() {}
- virtual void SetUp() { cache_ = new PnaclTranslationCache(); }
+ virtual void SetUp() { cache_.reset(new PnaclTranslationCache()); }
virtual void TearDown() {
// The destructor of PnaclTranslationCacheWriteEntry posts a task to the IO
// thread to close the backend cache entry. We want to make sure the entries
@@ -35,14 +35,14 @@ class PnaclTranslationCacheTest : public testing::Test {
// for the memory backend has a DCHECK to verify this), so we run the loop
// here to ensure the task gets processed.
base::RunLoop().RunUntilIdle();
- delete cache_;
+ cache_.reset();
}
void InitBackend(bool in_mem);
void StoreNexe(const std::string& key, const std::string& nexe);
std::string GetNexe(const std::string& key);
- PnaclTranslationCache* cache_;
+ scoped_ptr<PnaclTranslationCache> cache_;
content::TestBrowserThreadBundle thread_bundle_;
base::ScopedTempDir temp_dir_;
};
« no previous file with comments | « chrome/browser/nacl_host/pnacl_translation_cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698