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

Unified Diff: base/debug/trace_event_impl.h

Issue 443523003: Remove TraceOptions string based constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 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 | « no previous file | base/debug/trace_event_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event_impl.h
diff --git a/base/debug/trace_event_impl.h b/base/debug/trace_event_impl.h
index ab5d09e9d97ce9753ea933afafb39fe9fc9a3bb4..4cbb72144739043fe7a25f348dd6fc572ce722d5 100644
--- a/base/debug/trace_event_impl.h
+++ b/base/debug/trace_event_impl.h
@@ -409,11 +409,21 @@ struct BASE_EXPORT TraceOptions {
// options_string, the last one takes precedence. If none of the trace
// recording mode is specified, recording mode is RECORD_UNTIL_FULL.
//
- // Example: TraceOptions("record-until-full")
- // Example: TraceOptions("record-continuously, enable-sampling")
- // Example: TraceOptions("record-until-full, trace-to-console") would have
- // ECHO_TO_CONSOLE as the recording mode.
- explicit TraceOptions(const std::string& options_string);
+ // The trace option will first be reset to the default option
+ // (record_mode set to RECORD_UNTIL_FULL, enable_sampling and enable_systrace
+ // set to false) before options parsed from |options_string| are applied on
+ // it.
+ // If |options_string| is invalid, the final state of trace_options is
+ // undefined.
+ //
+ // Example: trace_options.SetFromString("record-until-full")
+ // Example: trace_options.SetFromString(
+ // "record-continuously, enable-sampling")
+ // Example: trace_options.SetFromString("record-until-full, trace-to-console")
+ // will set ECHO_TO_CONSOLE as the recording mode.
+ //
+ // Returns true on success.
+ bool SetFromString(const std::string& options_string);
std::string ToString() const;
« no previous file with comments | « no previous file | base/debug/trace_event_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698