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

Unified Diff: base/trace_event/trace_config.cc

Issue 2624583002: Remove redundant c_str() calls. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: base/trace_event/trace_config.cc
diff --git a/base/trace_event/trace_config.cc b/base/trace_event/trace_config.cc
index 36de107bf8bc444426de0f16651306fb2a8d0b46..4f28d378fca4bb65cedc335ca70993d2757a8c1b 100644
--- a/base/trace_event/trace_config.cc
+++ b/base/trace_event/trace_config.cc
@@ -321,7 +321,7 @@ bool TraceConfig::IsCategoryGroupEnabled(
DCHECK(!TraceConfig::IsEmptyOrContainsLeadingOrTrailingWhitespace(
category_group_token))
<< "Disallowed category string";
- if (IsCategoryEnabled(category_group_token.c_str()))
+ if (IsCategoryEnabled(category_group_token))
return true;
if (!MatchPattern(category_group_token, TRACE_DISABLED_BY_DEFAULT("*")))
@@ -855,7 +855,7 @@ void TraceConfig::WriteCategoryFilterString(const StringList& delays,
}
}
-bool TraceConfig::IsCategoryEnabled(const char* category_name) const {
+bool TraceConfig::IsCategoryEnabled(StringPiece category_name) const {
Andrey Kraynov 2017/01/09 21:50:45 Later |category_name| will be used as an argument
Primiano Tucci (use gerrit) 2017/01/09 23:52:37 Please don't change this signature. This is used b
Andrey Kraynov 2017/01/10 06:24:53 My point was that in case of the old signature of
Primiano Tucci (use gerrit) 2017/01/10 10:48:43 ahh sorry you are right, it would actually happen
// Check the disabled- filters and the disabled-* wildcard first so that a
// "*" filter does not include the disabled.
for (const std::string& category : disabled_categories_) {

Powered by Google App Engine
This is Rietveld 408576698