OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 #include "base/trace_event/trace_config.h" | 5 #include "base/trace_event/trace_config.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 excluded_categories_.clear(); | 310 excluded_categories_.clear(); |
311 synthetic_delays_.clear(); | 311 synthetic_delays_.clear(); |
312 memory_dump_config_.Clear(); | 312 memory_dump_config_.Clear(); |
313 } | 313 } |
314 | 314 |
315 void TraceConfig::InitializeDefault() { | 315 void TraceConfig::InitializeDefault() { |
316 record_mode_ = RECORD_UNTIL_FULL; | 316 record_mode_ = RECORD_UNTIL_FULL; |
317 enable_sampling_ = false; | 317 enable_sampling_ = false; |
318 enable_systrace_ = false; | 318 enable_systrace_ = false; |
319 enable_argument_filter_ = false; | 319 enable_argument_filter_ = false; |
320 excluded_categories_.push_back("*Debug"); | |
321 excluded_categories_.push_back("*Test"); | |
322 } | 320 } |
323 | 321 |
324 void TraceConfig::InitializeFromConfigDict(const DictionaryValue& dict) { | 322 void TraceConfig::InitializeFromConfigDict(const DictionaryValue& dict) { |
325 record_mode_ = RECORD_UNTIL_FULL; | 323 record_mode_ = RECORD_UNTIL_FULL; |
326 std::string record_mode; | 324 std::string record_mode; |
327 if (dict.GetString(kRecordModeParam, &record_mode)) { | 325 if (dict.GetString(kRecordModeParam, &record_mode)) { |
328 if (record_mode == kRecordUntilFull) { | 326 if (record_mode == kRecordUntilFull) { |
329 record_mode_ = RECORD_UNTIL_FULL; | 327 record_mode_ = RECORD_UNTIL_FULL; |
330 } else if (record_mode == kRecordContinuously) { | 328 } else if (record_mode == kRecordContinuously) { |
331 record_mode_ = RECORD_CONTINUOUSLY; | 329 record_mode_ = RECORD_CONTINUOUSLY; |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 str.at(0) == ' ' || | 725 str.at(0) == ' ' || |
728 str.at(str.length() - 1) == ' '; | 726 str.at(str.length() - 1) == ' '; |
729 } | 727 } |
730 | 728 |
731 bool TraceConfig::HasIncludedPatterns() const { | 729 bool TraceConfig::HasIncludedPatterns() const { |
732 return !included_categories_.empty(); | 730 return !included_categories_.empty(); |
733 } | 731 } |
734 | 732 |
735 } // namespace trace_event | 733 } // namespace trace_event |
736 } // namespace base | 734 } // namespace base |
OLD | NEW |