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

Unified Diff: content/public/browser/tracing_controller.h

Issue 66893003: Allow TracingController to output trace data to specified file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Avoid allowIO by posting tasks Created 7 years, 1 month 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
Index: content/public/browser/tracing_controller.h
diff --git a/content/public/browser/tracing_controller.h b/content/public/browser/tracing_controller.h
index d3bc7bd9df9f2ec6dc5cbd6d305d6dacaec1e070..d4d54880d450819930a1c05b71a3ffbe6a31469c 100644
--- a/content/public/browser/tracing_controller.h
+++ b/content/public/browser/tracing_controller.h
@@ -75,9 +75,15 @@ class TracingController {
// Once all child processes have acked to the DisableRecording request,
// TracingFileResultCallback will be called back with a file that contains
// the traced data.
- typedef base::Callback<void(scoped_ptr<base::FilePath>)>
- TracingFileResultCallback;
- virtual bool DisableRecording(const TracingFileResultCallback& callback) = 0;
+ //
+ // Trace data will be written into |result_file_path| if it is not empty, or
+ // into a temporary file. The actual file path will be passed to |callback|.
+ //
+ // If |result_file_path| is empty and |callback| is null, trace data won't be
dsinclair 2013/11/18 16:32:18 Isn't this an OR instead of an AND.
Xianzhu 2013/11/18 21:50:39 Used 'AND' because I thought the following might b
Xianzhu 2013/11/18 21:56:09 Note this is also consistent with other methods th
+ // written to any file.
+ typedef base::Callback<void(const base::FilePath&)> TracingFileResultCallback;
+ virtual bool DisableRecording(const base::FilePath& result_file_path,
+ const TracingFileResultCallback& callback) = 0;
// Start monitoring on all processes.
//
@@ -119,7 +125,14 @@ class TracingController {
// Once all child processes have acked to the CaptureMonitoringSnapshot
// request, TracingFileResultCallback will be called back with a file that
// contains the traced data.
+ //
+ // Trace data will be written into |result_file_path| if it is not empty, or
+ // into a temporary file. The actual file path will be passed to |callback|.
+ //
+ // If |result_file_path| is empty and |callback| is null, trace data won't be
+ // written to any file.
virtual void CaptureMonitoringSnapshot(
+ const base::FilePath& result_file_path,
const TracingFileResultCallback& callback) = 0;
protected:

Powered by Google App Engine
This is Rietveld 408576698