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

Side by Side Diff: base/trace_event/trace_event_argument.h

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 unified diff | Download patch
« no previous file with comments | « base/trace_event/trace_event_android.cc ('k') | base/trace_event/trace_event_argument.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 BASE_TRACE_EVENT_TRACE_EVENT_ARGUMENT_H_ 5 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_ARGUMENT_H_
6 #define BASE_TRACE_EVENT_TRACE_EVENT_ARGUMENT_H_ 6 #define BASE_TRACE_EVENT_TRACE_EVENT_ARGUMENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory>
10 #include <string> 11 #include <string>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/pickle.h" 15 #include "base/pickle.h"
16 #include "base/strings/string_piece.h" 16 #include "base/strings/string_piece.h"
17 #include "base/trace_event/trace_event_impl.h" 17 #include "base/trace_event/trace_event_impl.h"
18 18
19 namespace base { 19 namespace base {
20 20
21 class Value; 21 class Value;
22 22
23 namespace trace_event { 23 namespace trace_event {
24 24
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 // ConvertableToTraceFormat implementation. 61 // ConvertableToTraceFormat implementation.
62 void AppendAsTraceFormat(std::string* out) const override; 62 void AppendAsTraceFormat(std::string* out) const override;
63 63
64 void EstimateTraceMemoryOverhead(TraceEventMemoryOverhead* overhead) override; 64 void EstimateTraceMemoryOverhead(TraceEventMemoryOverhead* overhead) override;
65 65
66 // DEPRECATED: do not use, here only for legacy reasons. These methods causes 66 // DEPRECATED: do not use, here only for legacy reasons. These methods causes
67 // a copy-and-translation of the base::Value into the equivalent TracedValue. 67 // a copy-and-translation of the base::Value into the equivalent TracedValue.
68 // TODO(primiano): migrate the (three) existing clients to the cheaper 68 // TODO(primiano): migrate the (three) existing clients to the cheaper
69 // SetValue(TracedValue) API. crbug.com/495628. 69 // SetValue(TracedValue) API. crbug.com/495628.
70 void SetValue(const char* name, scoped_ptr<base::Value> value); 70 void SetValue(const char* name, std::unique_ptr<base::Value> value);
71 void SetBaseValueWithCopiedName(base::StringPiece name, 71 void SetBaseValueWithCopiedName(base::StringPiece name,
72 const base::Value& value); 72 const base::Value& value);
73 void AppendBaseValue(const base::Value& value); 73 void AppendBaseValue(const base::Value& value);
74 74
75 // Public for tests only. 75 // Public for tests only.
76 scoped_ptr<base::Value> ToBaseValue() const; 76 std::unique_ptr<base::Value> ToBaseValue() const;
77 77
78 private: 78 private:
79 Pickle pickle_; 79 Pickle pickle_;
80 80
81 #ifndef NDEBUG 81 #ifndef NDEBUG
82 // In debug builds checks the pairings of {Start,End}{Dictionary,Array} 82 // In debug builds checks the pairings of {Start,End}{Dictionary,Array}
83 std::vector<bool> nesting_stack_; 83 std::vector<bool> nesting_stack_;
84 #endif 84 #endif
85 85
86 DISALLOW_COPY_AND_ASSIGN(TracedValue); 86 DISALLOW_COPY_AND_ASSIGN(TracedValue);
87 }; 87 };
88 88
89 } // namespace trace_event 89 } // namespace trace_event
90 } // namespace base 90 } // namespace base
91 91
92 #endif // BASE_TRACE_EVENT_TRACE_EVENT_ARGUMENT_H_ 92 #endif // BASE_TRACE_EVENT_TRACE_EVENT_ARGUMENT_H_
OLDNEW
« no previous file with comments | « base/trace_event/trace_event_android.cc ('k') | base/trace_event/trace_event_argument.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698