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

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

Issue 22962004: Thread-local trace-event buffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update browser_shutdown_profile_dumper Created 7 years, 3 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
OLDNEW
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_BROWSER_BROWSER_SHUTDOWN_PROFILE_DUMPER_H_ 5 #ifndef CONTENT_BROWSER_BROWSER_SHUTDOWN_PROFILE_DUMPER_H_
6 #define CONTENT_BROWSER_BROWSER_SHUTDOWN_PROFILE_DUMPER_H_ 6 #define CONTENT_BROWSER_BROWSER_SHUTDOWN_PROFILE_DUMPER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 24 matching lines...) Expand all
35 private: 35 private:
36 // Writes all traces which happened to disk. 36 // Writes all traces which happened to disk.
37 void WriteTracesToDisc(const base::FilePath& file_name); 37 void WriteTracesToDisc(const base::FilePath& file_name);
38 38
39 // Returns the file name where we should save the trace dump to. 39 // Returns the file name where we should save the trace dump to.
40 base::FilePath GetFileName(); 40 base::FilePath GetFileName();
41 41
42 // The callback for the |TraceLog::Flush| function. It saves all traces to 42 // The callback for the |TraceLog::Flush| function. It saves all traces to
43 // disc. 43 // disc.
44 void WriteTraceDataCollected( 44 void WriteTraceDataCollected(
45 const scoped_refptr<base::RefCountedString>& events_str); 45 const scoped_refptr<base::RefCountedString>& events_str,
46 bool has_more_events);
46 47
47 // Returns true if the dump file is valid. 48 // Returns true if the dump file is valid.
48 bool IsFileValid(); 49 bool IsFileValid();
49 50
50 // Writes a string to the dump file. 51 // Writes a string to the dump file.
51 void WriteString(const std::string& string); 52 void WriteString(const std::string& string);
52 53
53 // Write a buffer to the dump file. 54 // Write a buffer to the dump file.
54 void WriteChars(const char* chars, size_t size); 55 void WriteChars(const char* chars, size_t size);
55 56
56 // Closes the dump file. 57 // Closes the dump file.
57 void CloseFile(); 58 void CloseFile();
58 59
59 // The number of blocks we have already written. 60 // The number of blocks we have already written.
60 int blocks_; 61 int blocks_;
61 // For dumping the content to disc. 62 // For dumping the content to disc.
62 FILE* dump_file_; 63 FILE* dump_file_;
63 64
64 DISALLOW_COPY_AND_ASSIGN(BrowserShutdownProfileDumper); 65 DISALLOW_COPY_AND_ASSIGN(BrowserShutdownProfileDumper);
65 }; 66 };
66 67
67 } // namespace content 68 } // namespace content
68 69
69 #endif // CONTENT_BROWSER_BROWSER_SHUTDOWN_PROFILE_DUMPER_H_ 70 #endif // CONTENT_BROWSER_BROWSER_SHUTDOWN_PROFILE_DUMPER_H_
OLDNEW
« no previous file with comments | « components/tracing/child_trace_message_filter.cc ('k') | content/browser/browser_shutdown_profile_dumper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698