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

Unified Diff: chrome/browser/metrics/thread_watcher_unittest.cc

Issue 2299453005: Revert of Fix memory leak in ThreadWatcher. (Closed)
Patch Set: Created 4 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 | « chrome/browser/metrics/thread_watcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/thread_watcher_unittest.cc
diff --git a/chrome/browser/metrics/thread_watcher_unittest.cc b/chrome/browser/metrics/thread_watcher_unittest.cc
index c5ee92364f3964958e2518e85487ad793c7aca44..4aca262b664fda495d657724d99aeec98ba7856d 100644
--- a/chrome/browser/metrics/thread_watcher_unittest.cc
+++ b/chrome/browser/metrics/thread_watcher_unittest.cc
@@ -279,19 +279,13 @@
thread_watcher_list_ = new ThreadWatcherList();
// Create thread watcher object for the IO thread.
- std::unique_ptr<CustomThreadWatcher> io_watcher(
- new CustomThreadWatcher(BrowserThread::IO, kIOThreadName,
- kSleepTime, kUnresponsiveTime));
- io_watcher_ = io_watcher.get();
- ASSERT_TRUE(ThreadWatcherList::Register(std::move(io_watcher)));
+ io_watcher_ = new CustomThreadWatcher(BrowserThread::IO, kIOThreadName,
+ kSleepTime, kUnresponsiveTime);
EXPECT_EQ(io_watcher_, thread_watcher_list_->Find(BrowserThread::IO));
// Create thread watcher object for the DB thread.
- std::unique_ptr<CustomThreadWatcher> db_watcher(
- new CustomThreadWatcher(BrowserThread::DB, kDBThreadName,
- kSleepTime, kUnresponsiveTime));
- db_watcher_ = db_watcher.get();
- ASSERT_TRUE(ThreadWatcherList::Register(std::move(db_watcher)));
+ db_watcher_ = new CustomThreadWatcher(BrowserThread::DB, kDBThreadName,
+ kSleepTime, kUnresponsiveTime);
EXPECT_EQ(db_watcher_, thread_watcher_list_->Find(BrowserThread::DB));
{
« no previous file with comments | « chrome/browser/metrics/thread_watcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698