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

Side by Side Diff: third_party/WebKit/Source/platform/TracedValue.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/TracedValue.h" 5 #include "platform/TracedValue.h"
6 6
7 #include "base/trace_event/trace_event_argument.h" 7 #include "base/trace_event/trace_event_argument.h"
8 #include "wtf/PtrUtil.h"
8 #include "wtf/text/StringUTF8Adaptor.h" 9 #include "wtf/text/StringUTF8Adaptor.h"
10 #include <memory>
9 11
10 namespace blink { 12 namespace blink {
11 13
12 PassOwnPtr<TracedValue> TracedValue::create() 14 std::unique_ptr<TracedValue> TracedValue::create()
13 { 15 {
14 return adoptPtr(new TracedValue()); 16 return wrapUnique(new TracedValue());
15 } 17 }
16 18
17 TracedValue::TracedValue() 19 TracedValue::TracedValue()
18 : m_tracedValue(new base::trace_event::TracedValue) 20 : m_tracedValue(new base::trace_event::TracedValue)
19 { 21 {
20 } 22 }
21 23
22 TracedValue::~TracedValue() 24 TracedValue::~TracedValue()
23 { 25 {
24 } 26 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 113
112 String TracedValue::toString() const 114 String TracedValue::toString() const
113 { 115 {
114 ASSERT(m_tracedValue.get()); 116 ASSERT(m_tracedValue.get());
115 std::string out; 117 std::string out;
116 m_tracedValue->AppendAsTraceFormat(&out); 118 m_tracedValue->AppendAsTraceFormat(&out);
117 return String::fromUTF8(out.c_str()); 119 return String::fromUTF8(out.c_str());
118 } 120 }
119 121
120 } // namespace blink 122 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/TracedValue.h ('k') | third_party/WebKit/Source/platform/TracedValueTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698