| 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 CHROME_TEST_BASE_TRACING_H_ | 5 #ifndef CHROME_TEST_BASE_TRACING_H_ |
| 6 #define CHROME_TEST_BASE_TRACING_H_ | 6 #define CHROME_TEST_BASE_TRACING_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // Example: BeginTracing("-excluded_category1,-excluded_category2"); | 25 // Example: BeginTracing("-excluded_category1,-excluded_category2"); |
| 26 // | 26 // |
| 27 // See base/trace_event/trace_event.h for documentation of included and excluded | 27 // See base/trace_event/trace_event.h for documentation of included and excluded |
| 28 // category_patterns. | 28 // category_patterns. |
| 29 bool BeginTracing(const std::string& category_patterns) WARN_UNUSED_RESULT; | 29 bool BeginTracing(const std::string& category_patterns) WARN_UNUSED_RESULT; |
| 30 | 30 |
| 31 // Called from UI thread. | 31 // Called from UI thread. |
| 32 // Begin tracing specified category_patterns on the browser. | 32 // Begin tracing specified category_patterns on the browser. |
| 33 // |trace_config| specifies the configuration for tracing. This includes the | 33 // |trace_config| specifies the configuration for tracing. This includes the |
| 34 // list of categories enabled, tracing modes and memory dumps configuration. | 34 // list of categories enabled, tracing modes and memory dumps configuration. |
| 35 // Once all child processes have acked to the StartTracing request, |
| 36 // |start_tracing_done_callback| will be called back. |
| 35 // | 37 // |
| 36 // See base/trace_event/trace_config.h for documentation of configurations. | 38 // See base/trace_event/trace_config.h for documentation of configurations. |
| 37 bool BeginTracingWithTraceConfig( | 39 bool BeginTracingWithTraceConfig( |
| 38 const base::trace_event::TraceConfig& trace_config) WARN_UNUSED_RESULT; | 40 const base::trace_event::TraceConfig& trace_config) WARN_UNUSED_RESULT; |
| 39 | 41 |
| 42 typedef base::Callback<void()> StartTracingDoneCallback; |
| 43 bool BeginTracingWithTraceConfig( |
| 44 const base::trace_event::TraceConfig& trace_config, |
| 45 StartTracingDoneCallback start_tracing_done_callback) WARN_UNUSED_RESULT; |
| 46 |
| 40 // Called from UI thread. | 47 // Called from UI thread. |
| 41 // End trace and collect the trace output as a json string. | 48 // End trace and collect the trace output as a json string. |
| 42 bool EndTracing(std::string* json_trace_output) WARN_UNUSED_RESULT; | 49 bool EndTracing(std::string* json_trace_output) WARN_UNUSED_RESULT; |
| 43 | 50 |
| 44 } // namespace tracing | 51 } // namespace tracing |
| 45 | 52 |
| 46 #endif // CHROME_TEST_BASE_TRACING_H_ | 53 #endif // CHROME_TEST_BASE_TRACING_H_ |
| OLD | NEW |