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

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

Issue 621883002: Adding a ToPrettyString method to ConvertableToTracedValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | 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 #ifndef BASE_DEBUG_TRACE_EVENT_ARGUMENT_H_ 5 #ifndef BASE_DEBUG_TRACE_EVENT_ARGUMENT_H_
6 #define BASE_DEBUG_TRACE_EVENT_ARGUMENT_H_ 6 #define BASE_DEBUG_TRACE_EVENT_ARGUMENT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 23 matching lines...) Expand all
34 void BeginArray(const char* name); 34 void BeginArray(const char* name);
35 35
36 void AppendInteger(int); 36 void AppendInteger(int);
37 void AppendDouble(double); 37 void AppendDouble(double);
38 void AppendBoolean(bool); 38 void AppendBoolean(bool);
39 void AppendString(const std::string&); 39 void AppendString(const std::string&);
40 void BeginArray(); 40 void BeginArray();
41 void BeginDictionary(); 41 void BeginDictionary();
42 42
43 virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE; 43 virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE;
44 virtual std::string ToPrettyString() const OVERRIDE;
44 45
45 private: 46 private:
46 virtual ~TracedValue(); 47 virtual ~TracedValue();
47 48
48 DictionaryValue* GetCurrentDictionary(); 49 DictionaryValue* GetCurrentDictionary();
49 ListValue* GetCurrentArray(); 50 ListValue* GetCurrentArray();
50 51
51 scoped_ptr<base::Value> root_; 52 scoped_ptr<base::Value> root_;
52 std::vector<Value*> stack_; 53 std::vector<Value*> stack_;
53 DISALLOW_COPY_AND_ASSIGN(TracedValue); 54 DISALLOW_COPY_AND_ASSIGN(TracedValue);
54 }; 55 };
55 56
56 } // namespace debug 57 } // namespace debug
57 } // namespace base 58 } // namespace base
58 59
59 #endif // BASE_DEBUG_TRACE_EVENT_ARGUMENT_H_ 60 #endif // BASE_DEBUG_TRACE_EVENT_ARGUMENT_H_
OLDNEW
« no previous file with comments | « no previous file | base/debug/trace_event_argument.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698