Index: base/debug/trace_event_impl.h |
diff --git a/base/debug/trace_event_impl.h b/base/debug/trace_event_impl.h |
index f152b0a413b4302e51191518b2c3993252d15d70..ed82a4d3c178e3a0ec7f2bfbe3d87454c857fff6 100644 |
--- a/base/debug/trace_event_impl.h |
+++ b/base/debug/trace_event_impl.h |
@@ -157,6 +157,10 @@ class BASE_EXPORT TraceResultBuffer { |
bool append_comma_; |
}; |
+// TraceMode determines how the trace buffer stores data. |
+enum BASE_EXPORT TraceMode { |
+ UNTIL_FULL = 0 |
+}; |
class BASE_EXPORT TraceLog { |
public: |
@@ -185,7 +189,8 @@ class BASE_EXPORT TraceLog { |
// Else if excluded_categories is non-empty, everything but those are traced. |
// Wildcards * and ? are supported (see MatchPattern in string_util.h). |
void SetEnabled(const std::vector<std::string>& included_categories, |
- const std::vector<std::string>& excluded_categories); |
+ const std::vector<std::string>& excluded_categories, |
+ TraceMode mode); |
// |categories| is a comma-delimited list of category wildcards. |
// A category can have an optional '-' prefix to make it an excluded category. |
@@ -195,17 +200,19 @@ class BASE_EXPORT TraceLog { |
// Example: SetEnabled("test_MyTest*"); |
// Example: SetEnabled("test_MyTest*,test_OtherStuff"); |
// Example: SetEnabled("-excluded_category1,-excluded_category2"); |
- void SetEnabled(const std::string& categories); |
+ void SetEnabled(const std::string& categories, TraceMode mode); |
// Retieves the categories set via a prior call to SetEnabled(). Only |
// meaningful if |IsEnabled()| is true. |
void GetEnabledTraceCategories(std::vector<std::string>* included_out, |
std::vector<std::string>* excluded_out); |
+ TraceMode GetTraceMode() { return trace_mode_; } |
+ |
// Disable tracing for all categories. |
void SetDisabled(); |
// Helper method to enable/disable tracing for all categories. |
- void SetEnabled(bool enabled); |
+ void SetEnabled(bool enabled, TraceMode mode); |
bool IsEnabled() { return !!enable_count_; } |
#if defined(OS_ANDROID) |
@@ -400,6 +407,8 @@ class BASE_EXPORT TraceLog { |
const unsigned char* watch_category_; |
std::string watch_event_name_; |
+ TraceMode trace_mode_; |
+ |
DISALLOW_COPY_AND_ASSIGN(TraceLog); |
}; |