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

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

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 637
638 for (size_t event_filter_index = 0; 638 for (size_t event_filter_index = 0;
639 event_filter_index < category_event_filters.GetSize(); 639 event_filter_index < category_event_filters.GetSize();
640 ++event_filter_index) { 640 ++event_filter_index) {
641 const base::DictionaryValue* event_filter = nullptr; 641 const base::DictionaryValue* event_filter = nullptr;
642 if (!category_event_filters.GetDictionary(event_filter_index, 642 if (!category_event_filters.GetDictionary(event_filter_index,
643 &event_filter)) 643 &event_filter))
644 continue; 644 continue;
645 645
646 std::string predicate_name; 646 std::string predicate_name;
647 CHECK(event_filter->GetString(kFilterPredicateParam, &predicate_name)) 647 // Invalid predicate name in category event filter.
648 << "Invalid predicate name in category event filter."; 648 CHECK(event_filter->GetString(kFilterPredicateParam, &predicate_name));
649 649
650 EventFilterConfig new_config(predicate_name); 650 EventFilterConfig new_config(predicate_name);
651 const base::ListValue* included_list = nullptr; 651 const base::ListValue* included_list = nullptr;
652 CHECK(event_filter->GetList(kIncludedCategoriesParam, &included_list)) 652 // Missing included_categories in category event filter.
653 << "Missing included_categories in category event filter."; 653 CHECK(event_filter->GetList(kIncludedCategoriesParam, &included_list));
654 654
655 for (size_t i = 0; i < included_list->GetSize(); ++i) { 655 for (size_t i = 0; i < included_list->GetSize(); ++i) {
656 std::string category; 656 std::string category;
657 if (included_list->GetString(i, &category)) 657 if (included_list->GetString(i, &category))
658 new_config.AddIncludedCategory(category); 658 new_config.AddIncludedCategory(category);
659 } 659 }
660 660
661 const base::ListValue* excluded_list = nullptr; 661 const base::ListValue* excluded_list = nullptr;
662 if (event_filter->GetList(kExcludedCategoriesParam, &excluded_list)) { 662 if (event_filter->GetList(kExcludedCategoriesParam, &excluded_list)) {
663 for (size_t i = 0; i < excluded_list->GetSize(); ++i) { 663 for (size_t i = 0; i < excluded_list->GetSize(); ++i) {
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 StringPiece str) { 849 StringPiece str) {
850 return str.empty() || str.front() == ' ' || str.back() == ' '; 850 return str.empty() || str.front() == ' ' || str.back() == ' ';
851 } 851 }
852 852
853 bool TraceConfig::HasIncludedPatterns() const { 853 bool TraceConfig::HasIncludedPatterns() const {
854 return !included_categories_.empty(); 854 return !included_categories_.empty();
855 } 855 }
856 856
857 } // namespace trace_event 857 } // namespace trace_event
858 } // namespace base 858 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698