| Index: base/trace_event/trace_event_impl.cc
|
| diff --git a/base/trace_event/trace_event_impl.cc b/base/trace_event/trace_event_impl.cc
|
| index 51c95f329b9b5d05075018340137bf9d6866f9c3..f81ce9648a19b9584b916e8644d5605362502615 100644
|
| --- a/base/trace_event/trace_event_impl.cc
|
| +++ b/base/trace_event/trace_event_impl.cc
|
| @@ -67,6 +67,7 @@ const char kRecordAsMuchAsPossible[] = "record-as-much-as-possible";
|
| const char kTraceToConsole[] = "trace-to-console";
|
| const char kEnableSampling[] = "enable-sampling";
|
| const char kEnableSystrace[] = "enable-systrace";
|
| +const char kEnableArgsWhitelist[] = "enable-args-whitelist";
|
|
|
| // Controls the number of trace events we will buffer in-memory
|
| // before throwing them away.
|
| @@ -1008,6 +1009,8 @@ bool TraceOptions::SetFromString(const std::string& options_string) {
|
| enable_sampling = true;
|
| } else if (*iter == kEnableSystrace) {
|
| enable_systrace = true;
|
| + } else if (*iter == kEnableArgsWhitelist) {
|
| + enable_args_whitelist = true;
|
| } else {
|
| return false;
|
| }
|
| @@ -1037,6 +1040,8 @@ std::string TraceOptions::ToString() const {
|
| ret = ret + "," + kEnableSampling;
|
| if (enable_systrace)
|
| ret = ret + "," + kEnableSystrace;
|
| + if (enable_args_whitelist)
|
| + ret = ret + "," + kEnableArgsWhitelist;
|
| return ret;
|
| }
|
|
|
| @@ -1501,6 +1506,8 @@ TraceLog::InternalTraceOptions TraceLog::GetInternalOptionsFromTraceOptions(
|
| const TraceOptions& options) {
|
| InternalTraceOptions ret =
|
| options.enable_sampling ? kInternalEnableSampling : kInternalNone;
|
| + if (options.enable_args_whitelist)
|
| + ret |= kInternalEnableArgsWhitelist;
|
| switch (options.record_mode) {
|
| case RECORD_UNTIL_FULL:
|
| return ret | kInternalRecordUntilFull;
|
| @@ -1524,6 +1531,7 @@ TraceOptions TraceLog::GetCurrentTraceOptions() const {
|
| TraceOptions ret;
|
| InternalTraceOptions option = trace_options();
|
| ret.enable_sampling = (option & kInternalEnableSampling) != 0;
|
| + ret.enable_args_whitelist = (option & kInternalEnableArgsWhitelist) != 0;
|
| if (option & kInternalRecordUntilFull)
|
| ret.record_mode = RECORD_UNTIL_FULL;
|
| else if (option & kInternalRecordContinuously)
|
|
|