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

Side by Side Diff: base/trace_event/trace_config.cc

Issue 2061923002: Fix default category filter for tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698