| OLD | NEW |
| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/trace_event/trace_event.h" | 12 #include "base/trace_event/trace_event.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class DictionaryValue; | 15 class DictionaryValue; |
| 16 class ListValue; | 16 class ListValue; |
| 17 class Value; | 17 class Value; |
| 18 | 18 |
| 19 namespace debug { | 19 namespace trace_event { |
| 20 | 20 |
| 21 class BASE_EXPORT TracedValue : public ConvertableToTraceFormat { | 21 class BASE_EXPORT TracedValue : public ConvertableToTraceFormat { |
| 22 public: | 22 public: |
| 23 TracedValue(); | 23 TracedValue(); |
| 24 | 24 |
| 25 void EndDictionary(); | 25 void EndDictionary(); |
| 26 void EndArray(); | 26 void EndArray(); |
| 27 | 27 |
| 28 void SetInteger(const char* name, int value); | 28 void SetInteger(const char* name, int value); |
| 29 void SetDouble(const char* name, double); | 29 void SetDouble(const char* name, double); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 46 ~TracedValue() override; | 46 ~TracedValue() override; |
| 47 | 47 |
| 48 DictionaryValue* GetCurrentDictionary(); | 48 DictionaryValue* GetCurrentDictionary(); |
| 49 ListValue* GetCurrentArray(); | 49 ListValue* GetCurrentArray(); |
| 50 | 50 |
| 51 scoped_ptr<base::Value> root_; | 51 scoped_ptr<base::Value> root_; |
| 52 std::vector<Value*> stack_; | 52 std::vector<Value*> stack_; |
| 53 DISALLOW_COPY_AND_ASSIGN(TracedValue); | 53 DISALLOW_COPY_AND_ASSIGN(TracedValue); |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 } // namespace trace_event |
| 57 } // namespace base |
| 58 |
| 59 // TODO(ssid): remove these aliases after the tracing clients are moved to the |
| 60 // new trace_event namespace. See crbug.com/451032. ETA: March 2015. |
| 61 namespace base { |
| 62 namespace debug { |
| 63 using base::trace_event::TracedValue; |
| 56 } // namespace debug | 64 } // namespace debug |
| 57 } // namespace base | 65 } // namespace base |
| 58 | 66 |
| 59 #endif // BASE_TRACE_EVENT_TRACE_EVENT_ARGUMENT_H_ | 67 #endif // BASE_TRACE_EVENT_TRACE_EVENT_ARGUMENT_H_ |
| OLD | NEW |