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

Unified Diff: base/trace_event/trace_config.cc

Issue 2136453004: Reland of place string::find(prefix) == 0 pattern with base::StartsWith(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/apps/guest_view/web_view_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_config.cc
diff --git a/base/trace_event/trace_config.cc b/base/trace_event/trace_config.cc
index d4dc2cc2e4e3594abf9dacc02117c19a6de0fd40..ebdddd38987d409ff561625d1e560a21bf40253e 100644
--- a/base/trace_event/trace_config.cc
+++ b/base/trace_event/trace_config.cc
@@ -14,6 +14,7 @@
#include "base/strings/pattern.h"
#include "base/strings/string_split.h"
#include "base/strings/string_tokenizer.h"
+#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/memory_dump_request_args.h"
@@ -411,7 +412,8 @@
if (category.empty())
continue;
// Synthetic delays are of the form 'DELAY(delay;option;option;...)'.
- if (category.find(kSyntheticDelayCategoryFilterPrefix) == 0 &&
+ if (base::StartsWith(category, kSyntheticDelayCategoryFilterPrefix,
+ base::CompareCase::SENSITIVE) &&
category.at(category.size() - 1) == ')') {
category = category.substr(
strlen(kSyntheticDelayCategoryFilterPrefix),
« no previous file with comments | « no previous file | chrome/browser/apps/guest_view/web_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698