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

Unified Diff: base/trace_event/blame_context_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/trace_event/blame_context.cc ('k') | base/trace_event/common/trace_event_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/blame_context_unittest.cc
diff --git a/base/trace_event/blame_context_unittest.cc b/base/trace_event/blame_context_unittest.cc
index 7217d8fb1bb6e305621b0d475b72f1e2e63aa5b3..3ecf3e3fbd20a7af65bf49ff2b69fbaa79b99f45 100644
--- a/base/trace_event/blame_context_unittest.cc
+++ b/base/trace_event/blame_context_unittest.cc
@@ -5,6 +5,7 @@
#include "base/trace_event/blame_context.h"
#include "base/json/json_writer.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted_memory.h"
#include "base/run_loop.h"
#include "base/test/trace_event_analyzer.h"
@@ -71,7 +72,7 @@ class BlameContextTest : public testing::Test {
public:
void StartTracing();
void StopTracing();
- scoped_ptr<trace_analyzer::TraceAnalyzer> CreateTraceAnalyzer();
+ std::unique_ptr<trace_analyzer::TraceAnalyzer> CreateTraceAnalyzer();
};
void BlameContextTest::StartTracing() {
@@ -83,7 +84,7 @@ void BlameContextTest::StopTracing() {
trace_event::TraceLog::GetInstance()->SetDisabled();
}
-scoped_ptr<trace_analyzer::TraceAnalyzer>
+std::unique_ptr<trace_analyzer::TraceAnalyzer>
BlameContextTest::CreateTraceAnalyzer() {
trace_event::TraceResultBuffer buffer;
trace_event::TraceResultBuffer::SimpleOutput trace_output;
@@ -95,7 +96,7 @@ BlameContextTest::CreateTraceAnalyzer() {
run_loop.Run();
buffer.Finish();
- return make_scoped_ptr(
+ return WrapUnique(
trace_analyzer::TraceAnalyzer::Create(trace_output.json_output));
}
@@ -109,7 +110,8 @@ TEST_F(BlameContextTest, EnterAndLeave) {
blame_context.Leave();
}
StopTracing();
- scoped_ptr<trace_analyzer::TraceAnalyzer> analyzer = CreateTraceAnalyzer();
+ std::unique_ptr<trace_analyzer::TraceAnalyzer> analyzer =
+ CreateTraceAnalyzer();
trace_analyzer::TraceEventVector events;
Query q = Query::EventPhaseIs(TRACE_EVENT_PHASE_ENTER_CONTEXT) ||
@@ -143,7 +145,8 @@ TEST_F(BlameContextTest, DifferentCategories) {
disabled_blame_context.Leave();
}
StopTracing();
- scoped_ptr<trace_analyzer::TraceAnalyzer> analyzer = CreateTraceAnalyzer();
+ std::unique_ptr<trace_analyzer::TraceAnalyzer> analyzer =
+ CreateTraceAnalyzer();
trace_analyzer::TraceEventVector events;
Query q = Query::EventPhaseIs(TRACE_EVENT_PHASE_ENTER_CONTEXT) ||
@@ -173,7 +176,8 @@ TEST_F(BlameContextTest, TakeSnapshot) {
blame_context.TakeSnapshot();
}
StopTracing();
- scoped_ptr<trace_analyzer::TraceAnalyzer> analyzer = CreateTraceAnalyzer();
+ std::unique_ptr<trace_analyzer::TraceAnalyzer> analyzer =
+ CreateTraceAnalyzer();
trace_analyzer::TraceEventVector events;
Query q = Query::EventPhaseIs(TRACE_EVENT_PHASE_SNAPSHOT_OBJECT);
« no previous file with comments | « base/trace_event/blame_context.cc ('k') | base/trace_event/common/trace_event_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698