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

Side by Side Diff: content/browser/trace_subscriber_stdio.h

Issue 8373018: Internalize JSON chunk merging to trace_event.h API (retry). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more BASE_EXPORT Created 9 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/trace_controller.cc ('k') | content/browser/trace_subscriber_stdio.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 (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
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 void Write(const std::string& output_str);
38
37 FILE* file_; 39 FILE* file_;
40 base::debug::TraceResultBuffer trace_buffer_;
38 }; 41 };
39 42
40 #endif // CONTENT_BROWSER_TRACE_SUBSCRIBER_STDIO_H_ 43 #endif // CONTENT_BROWSER_TRACE_SUBSCRIBER_STDIO_H_
OLDNEW
« no previous file with comments | « content/browser/trace_controller.cc ('k') | content/browser/trace_subscriber_stdio.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698