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

Unified Diff: base/test/trace_event_analyzer.cc

Issue 2253973003: Add an explicit way of making IDs local or global (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lints Created 4 years, 4 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/test/trace_event_analyzer.cc
diff --git a/base/test/trace_event_analyzer.cc b/base/test/trace_event_analyzer.cc
index 64436dc1444bfd6e5db0a4c8762ea3392b1b6fbd..a65f373f8558d2724a5e6229df6d6dc878bb24aa 100644
--- a/base/test/trace_event_analyzer.cc
+++ b/base/test/trace_event_analyzer.cc
@@ -91,7 +91,9 @@ bool TraceEvent::SetFromJSON(const base::Value* event_value) {
LOG(ERROR) << "args is missing from TraceEvent JSON";
return false;
}
- if (require_id && !dictionary->GetString("id", &id)) {
+ if (require_id && !dictionary->GetString("id", &id) &&
+ !dictionary->GetString("local_id", &local_id) &&
+ !dictionary->GetString("global_id", &global_id)) {
LOG(ERROR) << "id is missing from ASYNC_BEGIN/ASYNC_END TraceEvent JSON";
return false;
}

Powered by Google App Engine
This is Rietveld 408576698