| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_TRACE_SUBSCRIBER_STDIO_H_ | 5 #ifndef CONTENT_BROWSER_TRACE_SUBSCRIBER_STDIO_H_ |
| 6 #define CONTENT_BROWSER_TRACE_SUBSCRIBER_STDIO_H_ | 6 #define CONTENT_BROWSER_TRACE_SUBSCRIBER_STDIO_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // Creates or overwrites the specified file. Returns true on success. | 22 // Creates or overwrites the specified file. Returns true on success. |
| 23 bool OpenFile(const FilePath& path); | 23 bool OpenFile(const FilePath& path); |
| 24 // Finishes json output and closes file. | 24 // Finishes json output and closes file. |
| 25 void CloseFile(); | 25 void CloseFile(); |
| 26 | 26 |
| 27 // Returns TRUE if we're currently writing data to a file. | 27 // Returns TRUE if we're currently writing data to a file. |
| 28 bool IsValid(); | 28 bool IsValid(); |
| 29 | 29 |
| 30 // Implementation of TraceSubscriber | 30 // Implementation of TraceSubscriber |
| 31 virtual void OnEndTracingComplete(); | 31 virtual void OnEndTracingComplete(); |
| 32 virtual void OnTraceDataCollected(const std::string& json_events); | 32 virtual void OnTraceDataCollected(const std::string& trace_fragment); |
| 33 | 33 |
| 34 virtual ~TraceSubscriberStdio(); | 34 virtual ~TraceSubscriberStdio(); |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 FILE* file_; | 37 FILE* file_; |
| 38 base::debug::TraceResultBuffer trace_buffer_; |
| 38 }; | 39 }; |
| 39 | 40 |
| 40 #endif // CONTENT_BROWSER_TRACE_SUBSCRIBER_STDIO_H_ | 41 #endif // CONTENT_BROWSER_TRACE_SUBSCRIBER_STDIO_H_ |
| OLD | NEW |