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

Unified Diff: content/browser/browser_shutdown_profile_dumper.h

Issue 359473006: Store unsaved trace data on exit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/browser_main_runner.cc ('k') | content/browser/browser_shutdown_profile_dumper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_shutdown_profile_dumper.h
diff --git a/content/browser/browser_shutdown_profile_dumper.h b/content/browser/browser_shutdown_profile_dumper.h
index f98a32cb9ca98d0dc42f5a0973bb541349b3bb8e..cc8666ef69daa5c825c36a3f4ba67fb65d0aa877 100644
--- a/content/browser/browser_shutdown_profile_dumper.h
+++ b/content/browser/browser_shutdown_profile_dumper.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/memory/ref_counted_memory.h"
#include "content/common/content_export.h"
@@ -29,19 +30,19 @@ namespace content {
// |SequencedWorkerPool| will get killed in the shutdown process.
class BrowserShutdownProfileDumper {
public:
- BrowserShutdownProfileDumper();
+ explicit BrowserShutdownProfileDumper(const base::FilePath& dump_file_name);
~BrowserShutdownProfileDumper();
+ // Returns the file name where we should save the shutdown trace dump to.
+ static base::FilePath GetShutdownProfileFileName();
+
private:
// Writes all traces which happened to disk.
- void WriteTracesToDisc(const base::FilePath& file_name);
+ void WriteTracesToDisc();
void EndTraceAndFlush(base::WaitableEvent* flush_complete_event);
- // Returns the file name where we should save the trace dump to.
- base::FilePath GetFileName();
-
// The callback for the |TraceLog::Flush| function. It saves all traces to
// disc.
void WriteTraceDataCollected(
@@ -61,6 +62,9 @@ class BrowserShutdownProfileDumper {
// Closes the dump file.
void CloseFile();
+ // The name of the dump file.
+ const base::FilePath dump_file_name_;
+
// The number of blocks we have already written.
int blocks_;
// For dumping the content to disc.
« no previous file with comments | « content/browser/browser_main_runner.cc ('k') | content/browser/browser_shutdown_profile_dumper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698