| 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 4aca262b664fda495d657724d99aeec98ba7856d..c5ee92364f3964958e2518e85487ad793c7aca44 100644
|
| --- a/chrome/browser/metrics/thread_watcher_unittest.cc
|
| +++ b/chrome/browser/metrics/thread_watcher_unittest.cc
|
| @@ -279,13 +279,19 @@ class ThreadWatcherTest : public ::testing::Test {
|
| thread_watcher_list_ = new ThreadWatcherList();
|
|
|
| // Create thread watcher object for the IO thread.
|
| - io_watcher_ = new CustomThreadWatcher(BrowserThread::IO, kIOThreadName,
|
| - kSleepTime, kUnresponsiveTime);
|
| + 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)));
|
| EXPECT_EQ(io_watcher_, thread_watcher_list_->Find(BrowserThread::IO));
|
|
|
| // Create thread watcher object for the DB thread.
|
| - db_watcher_ = new CustomThreadWatcher(BrowserThread::DB, kDBThreadName,
|
| - kSleepTime, kUnresponsiveTime);
|
| + 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)));
|
| EXPECT_EQ(db_watcher_, thread_watcher_list_->Find(BrowserThread::DB));
|
|
|
| {
|
|
|