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

Unified Diff: base/process/process_metrics_unittest.cc

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 years, 8 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 | « base/process/process_metrics_linux.cc ('k') | base/process/process_metrics_unittest_ios.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_metrics_unittest.cc
diff --git a/base/process/process_metrics_unittest.cc b/base/process/process_metrics_unittest.cc
index 96ba6ceabd9455c3b83a1ff52bc02d0ac1528f00..4c5b71d0bd50ca192c89e7906942f414318d5e7d 100644
--- a/base/process/process_metrics_unittest.cc
+++ b/base/process/process_metrics_unittest.cc
@@ -303,7 +303,7 @@ TEST_F(SystemMetricsTest, ParseVmstat) {
// calls to it.
TEST_F(SystemMetricsTest, TestNoNegativeCpuUsage) {
ProcessHandle handle = GetCurrentProcessHandle();
- scoped_ptr<ProcessMetrics> metrics(
+ std::unique_ptr<ProcessMetrics> metrics(
ProcessMetrics::CreateProcessMetrics(handle));
EXPECT_GE(metrics->GetCPUUsage(), 0.0);
@@ -424,7 +424,7 @@ TEST(ProcessMetricsTest, DISABLED_GetNumberOfThreads) {
ASSERT_GT(initial_threads, 0);
const int kNumAdditionalThreads = 10;
{
- scoped_ptr<Thread> my_threads[kNumAdditionalThreads];
+ std::unique_ptr<Thread> my_threads[kNumAdditionalThreads];
for (int i = 0; i < kNumAdditionalThreads; ++i) {
my_threads[i].reset(new Thread("GetNumberOfThreadsTest"));
my_threads[i]->Start();
@@ -496,7 +496,7 @@ TEST(ProcessMetricsTest, GetOpenFdCount) {
ASSERT_TRUE(child.IsValid());
WaitForEvent(temp_path, kSignalClosed);
- scoped_ptr<ProcessMetrics> metrics(
+ std::unique_ptr<ProcessMetrics> metrics(
ProcessMetrics::CreateProcessMetrics(child.Handle()));
EXPECT_EQ(0, metrics->GetOpenFdCount());
ASSERT_TRUE(child.Terminate(0, true));
« no previous file with comments | « base/process/process_metrics_linux.cc ('k') | base/process/process_metrics_unittest_ios.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698