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

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

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 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/debug/trace_event_android.cc ('k') | base/debug/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 // In the process of moving the trace event files. Right now the headers
6 // are being forwarded. In next CLs the change will get completed
7 // TODO(ssid): https://code.google.com/p/chromium/issues/detail?id=451032
8
5 #ifndef BASE_DEBUG_TRACE_EVENT_ARGUMENT_H_ 9 #ifndef BASE_DEBUG_TRACE_EVENT_ARGUMENT_H_
6 #define BASE_DEBUG_TRACE_EVENT_ARGUMENT_H_ 10 #define BASE_DEBUG_TRACE_EVENT_ARGUMENT_H_
7 11
8 #include <string> 12 #include "base/trace_event/trace_event_argument.h"
9 #include <vector>
10 13
11 #include "base/debug/trace_event.h" 14 #endif // BASE_DEBUG_TRACE_EVENT_ARGUMENT_H_
12 #include "base/memory/scoped_ptr.h"
13
14 namespace base {
15 class DictionaryValue;
16 class ListValue;
17 class Value;
18
19 namespace debug {
20
21 class BASE_EXPORT TracedValue : public ConvertableToTraceFormat {
22 public:
23 TracedValue();
24
25 void EndDictionary();
26 void EndArray();
27
28 void SetInteger(const char* name, int value);
29 void SetDouble(const char* name, double);
30 void SetBoolean(const char* name, bool value);
31 void SetString(const char* name, const std::string& value);
32 void SetValue(const char* name, Value* value);
33 void BeginDictionary(const char* name);
34 void BeginArray(const char* name);
35
36 void AppendInteger(int);
37 void AppendDouble(double);
38 void AppendBoolean(bool);
39 void AppendString(const std::string&);
40 void BeginArray();
41 void BeginDictionary();
42
43 void AppendAsTraceFormat(std::string* out) const override;
44
45 private:
46 ~TracedValue() override;
47
48 DictionaryValue* GetCurrentDictionary();
49 ListValue* GetCurrentArray();
50
51 scoped_ptr<base::Value> root_;
52 std::vector<Value*> stack_;
53 DISALLOW_COPY_AND_ASSIGN(TracedValue);
54 };
55
56 } // namespace debug
57 } // namespace base
58
59 #endif // BASE_DEBUG_TRACE_EVENT_ARGUMENT_H_
OLDNEW
« no previous file with comments | « base/debug/trace_event_android.cc ('k') | base/debug/trace_event_argument.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698