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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 #ifndef TracedValue_h 5 #ifndef TracedValue_h
6 #define TracedValue_h 6 #define TracedValue_h
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "platform/EventTracer.h" 9 #include "platform/EventTracer.h"
10 #include "wtf/PassOwnPtr.h"
10 #include "wtf/text/WTFString.h" 11 #include "wtf/text/WTFString.h"
11 #include <memory>
12 12
13 namespace base { 13 namespace base {
14 namespace trace_event { 14 namespace trace_event {
15 class TracedValue; 15 class TracedValue;
16 } 16 }
17 } 17 }
18 18
19 namespace blink { 19 namespace blink {
20 20
21 // TracedValue copies all passed names and values and doesn't retain references. 21 // TracedValue copies all passed names and values and doesn't retain references.
22 class PLATFORM_EXPORT TracedValue final { 22 class PLATFORM_EXPORT TracedValue final {
23 WTF_MAKE_NONCOPYABLE(TracedValue); 23 WTF_MAKE_NONCOPYABLE(TracedValue);
24 24
25 public: 25 public:
26 ~TracedValue(); 26 ~TracedValue();
27 27
28 static std::unique_ptr<TracedValue> create(); 28 static PassOwnPtr<TracedValue> create();
29 29
30 void endDictionary(); 30 void endDictionary();
31 void endArray(); 31 void endArray();
32 32
33 void setInteger(const char* name, int value); 33 void setInteger(const char* name, int value);
34 void setDouble(const char* name, double); 34 void setDouble(const char* name, double);
35 void setBoolean(const char* name, bool value); 35 void setBoolean(const char* name, bool value);
36 void setString(const char* name, const String& value); 36 void setString(const char* name, const String& value);
37 void beginArray(const char* name); 37 void beginArray(const char* name);
38 void beginDictionary(const char* name); 38 void beginDictionary(const char* name);
(...skipping 13 matching lines...) Expand all
52 // This will be moved (and become null) when TracedValue is passed to 52 // This will be moved (and become null) when TracedValue is passed to
53 // EventTracer::addTraceEvent(). 53 // EventTracer::addTraceEvent().
54 std::unique_ptr<base::trace_event::TracedValue> m_tracedValue; 54 std::unique_ptr<base::trace_event::TracedValue> m_tracedValue;
55 55
56 friend class EventTracer; 56 friend class EventTracer;
57 }; 57 };
58 58
59 } // namespace blink 59 } // namespace blink
60 60
61 #endif // TracedValue_h 61 #endif // TracedValue_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/TraceEventCommon.h ('k') | third_party/WebKit/Source/platform/TracedValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698