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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/debug/trace_event_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 5
6 #ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_ 6 #ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_
7 #define BASE_DEBUG_TRACE_EVENT_IMPL_H_ 7 #define BASE_DEBUG_TRACE_EVENT_IMPL_H_
8 8
9 #include <stack> 9 #include <stack>
10 #include <string> 10 #include <string>
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 enable_systrace(false) {} 402 enable_systrace(false) {}
403 403
404 // |options_string| is a comma-delimited list of trace options. 404 // |options_string| is a comma-delimited list of trace options.
405 // Possible options are: "record-until-full", "record-continuously", 405 // Possible options are: "record-until-full", "record-continuously",
406 // "trace-to-console", "enable-sampling" and "enable-systrace". 406 // "trace-to-console", "enable-sampling" and "enable-systrace".
407 // The first 3 options are trace recoding modes and hence 407 // The first 3 options are trace recoding modes and hence
408 // mutually exclusive. If more than one trace recording modes appear in the 408 // mutually exclusive. If more than one trace recording modes appear in the
409 // options_string, the last one takes precedence. If none of the trace 409 // options_string, the last one takes precedence. If none of the trace
410 // recording mode is specified, recording mode is RECORD_UNTIL_FULL. 410 // recording mode is specified, recording mode is RECORD_UNTIL_FULL.
411 // 411 //
412 // Example: TraceOptions("record-until-full") 412 // The trace option will first be reset to the default option
413 // Example: TraceOptions("record-continuously, enable-sampling") 413 // (record_mode set to RECORD_UNTIL_FULL, enable_sampling and enable_systrace
414 // Example: TraceOptions("record-until-full, trace-to-console") would have 414 // set to false) before options parsed from |options_string| are applied on
415 // ECHO_TO_CONSOLE as the recording mode. 415 // it.
416 explicit TraceOptions(const std::string& options_string); 416 // If |options_string| is invalid, the final state of trace_options is
417 // undefined.
418 //
419 // Example: trace_options.SetFromString("record-until-full")
420 // Example: trace_options.SetFromString(
421 // "record-continuously, enable-sampling")
422 // Example: trace_options.SetFromString("record-until-full, trace-to-console")
423 // will set ECHO_TO_CONSOLE as the recording mode.
424 //
425 // Returns true on success.
426 bool SetFromString(const std::string& options_string);
417 427
418 std::string ToString() const; 428 std::string ToString() const;
419 429
420 TraceRecordMode record_mode; 430 TraceRecordMode record_mode;
421 bool enable_sampling; 431 bool enable_sampling;
422 bool enable_systrace; 432 bool enable_systrace;
423 }; 433 };
424 434
425 class BASE_EXPORT TraceLog { 435 class BASE_EXPORT TraceLog {
426 public: 436 public:
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_; 811 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_;
802 subtle::AtomicWord generation_; 812 subtle::AtomicWord generation_;
803 813
804 DISALLOW_COPY_AND_ASSIGN(TraceLog); 814 DISALLOW_COPY_AND_ASSIGN(TraceLog);
805 }; 815 };
806 816
807 } // namespace debug 817 } // namespace debug
808 } // namespace base 818 } // namespace base
809 819
810 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ 820 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_
OLDNEW
« 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