| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // receives the trace data followed by a notification that all child processes | 31 // receives the trace data followed by a notification that all child processes |
| 32 // have completed tracing and the data collection is over. | 32 // have completed tracing and the data collection is over. |
| 33 // All methods are called on the UI thread. | 33 // All methods are called on the UI thread. |
| 34 // Close method will be called exactly once and no methods will be | 34 // Close method will be called exactly once and no methods will be |
| 35 // called after that. | 35 // called after that. |
| 36 class CONTENT_EXPORT TraceDataSink | 36 class CONTENT_EXPORT TraceDataSink |
| 37 : public base::RefCountedThreadSafe<TraceDataSink> { | 37 : public base::RefCountedThreadSafe<TraceDataSink> { |
| 38 public: | 38 public: |
| 39 virtual void AddTraceChunk(const std::string& chunk) {} | 39 virtual void AddTraceChunk(const std::string& chunk) {} |
| 40 virtual void SetSystemTrace(const std::string& data) {} | 40 virtual void SetSystemTrace(const std::string& data) {} |
| 41 virtual void SetMetadata(const std::string& data) {} |
| 41 virtual void Close() {} | 42 virtual void Close() {} |
| 42 | 43 |
| 43 protected: | 44 protected: |
| 44 friend class base::RefCountedThreadSafe<TraceDataSink>; | 45 friend class base::RefCountedThreadSafe<TraceDataSink>; |
| 45 virtual ~TraceDataSink() {} | 46 virtual ~TraceDataSink() {} |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 // An implementation of this interface is passed when constructing a | 49 // An implementation of this interface is passed when constructing a |
| 49 // TraceDataSink, and receives chunks of the final trace data as it's being | 50 // TraceDataSink, and receives chunks of the final trace data as it's being |
| 50 // constructed. | 51 // constructed. |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // Check if the tracing system is recording | 203 // Check if the tracing system is recording |
| 203 virtual bool IsRecording() const = 0; | 204 virtual bool IsRecording() const = 0; |
| 204 | 205 |
| 205 protected: | 206 protected: |
| 206 virtual ~TracingController() {} | 207 virtual ~TracingController() {} |
| 207 }; | 208 }; |
| 208 | 209 |
| 209 } // namespace content | 210 } // namespace content |
| 210 | 211 |
| 211 #endif // CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_ | 212 #endif // CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_ |
| OLD | NEW |